Print this page
5910 libnisdb won't build with modern GCC
*** 17,26 ****
--- 17,27 ----
* 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.
*/
*** 107,117 ****
*/
__nis_rule_value_t *
growRuleValue(int oldCount, int newCount, __nis_rule_value_t *old,
__nis_rule_value_t *rvIn) {
__nis_rule_value_t *rv;
! int i, j;
char *myself = "growRuleValue";
if (newCount <= 0 || newCount <= oldCount)
return (old);
--- 108,118 ----
*/
__nis_rule_value_t *
growRuleValue(int oldCount, int newCount, __nis_rule_value_t *old,
__nis_rule_value_t *rvIn) {
__nis_rule_value_t *rv;
! int i;
char *myself = "growRuleValue";
if (newCount <= 0 || newCount <= oldCount)
return (old);
*** 423,446 ****
*/
__nis_rule_value_t *
buildNisPlusRuleValue(__nis_table_mapping_t *t, db_query *q,
__nis_rule_value_t *rv) {
int i;
- __nis_single_value_t *sv;
- char *myself = "buildNisPlusRuleValue";
if (t == 0 || q == 0)
return (0);
rv = initRuleValue(1, rv);
if (rv == 0)
return (0);
for (i = 0; i < q->components.components_len; i++) {
- int ic;
- int iv, v, dup;
- int len;
/* Ignore out-of-range column index */
if (q->components.components_val[i].which_index >=
t->numColumns)
continue;
--- 424,442 ----
*** 615,627 ****
__nis_mapping_item_type_t lnative,
__nis_mapping_item_type_t rnative,
__nis_rule_value_t *rv,
int doAssign, int *stat) {
int i, j;
- char **new;
__nis_value_t *rval, *lval;
- __nis_buffer_t b = {0, 0};
__nis_mapping_item_t *litem;
int numItems;
char **dn = 0;
int numDN = 0;
char *myself = "addLdapRuleValue";
--- 611,621 ----
*** 743,753 ****
continue;
}
/* If we're out of values, repeat the last one */
if (j >= rval->numVals)
j = (rval->numVals > 0) ? rval->numVals-1 : 0;
! for (0; j < rval->numVals; j++) {
/*
* If this is the 'dn', and the value ends in a
* comma, append the appropriate search base.
*/
if (strcasecmp("dn", lval->val[i].value) == 0 &&
--- 737,747 ----
continue;
}
/* If we're out of values, repeat the last one */
if (j >= rval->numVals)
j = (rval->numVals > 0) ? rval->numVals-1 : 0;
! for (; j < rval->numVals; j++) {
/*
* If this is the 'dn', and the value ends in a
* comma, append the appropriate search base.
*/
if (strcasecmp("dn", lval->val[i].value) == 0 &&