Print this page
5910 libnisdb won't build with modern GCC

@@ -17,10 +17,11 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
+ * Copyright 2015 Gary Mills
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #include <strings.h>

@@ -1238,11 +1239,11 @@
 __nis_table_mapping_t **
 selectTableMapping(__nis_table_mapping_t *t, db_query *q,
                         int wantWrite, int wantObj, char *dbId,
                         int *numMatches) {
         __nis_table_mapping_t   *r, *x, **tp;
-        int                     i, j, k, nm, numap;
+        int                     i, nm, numap;
         char                    *myself = "selectTableMapping";
 
         if (numMatches == 0)
                 numMatches = &nm;
 

@@ -1417,12 +1418,10 @@
  * 't->objectDN->write'. Return an appropriate LDAP status code.
  */
 int
 objToLDAP(__nis_table_mapping_t *t, nis_object *o, entry_obj **ea, int numEa) {
         __nis_table_mapping_t   **tp;
-        XDR                     xdr;
-        char                    *objName;
         int                     stat, osize, n, numMatches = 0;
         void                    *buf;
         __nis_rule_value_t      *rv;
         __nis_value_t           *val;
         __nis_single_value_t    *sv;

@@ -1543,11 +1542,10 @@
  */
 int
 objFromLDAP(__nis_table_mapping_t *t, nis_object **obj,
                 entry_obj ***eaP, int *numEaP) {
         __nis_table_mapping_t   **tp;
-        XDR                     xdr;
         nis_object              *o;
         __nis_rule_value_t      *rv;
         __nis_ldap_search_t     *ls;
         char                    *attrs[2], *filter, **fc = 0;
         void                    *buf;