summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/tools/dbscan.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-08-31 21:17:30 -0600
committerRich Megginson <rmeggins@redhat.com>2010-09-01 17:08:30 -0600
commitea408efe551ad837b08423f6d32b5433ab8dfe2b (patch)
tree0e8d7a4132d9973498e7746cefdfcfb3f97a386f /ldap/servers/slapd/tools/dbscan.c
parent19c62472381cf72bc7bd20694bbd672edde7f94f (diff)
downloadds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.tar.gz
ds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.tar.xz
ds-ea408efe551ad837b08423f6d32b5433ab8dfe2b.zip
fix compiler warnings - unused vars/funcs, invalid casts
This commit fixes many compiler warnings, mostly for things like unused variables, functions, goto labels. One place was using csngen_free instead of csn_free. A couple of places were using casts incorrectly, and several places needed some casts added. Tested on: RHEL5 x86_64, Fedora 14 x86_64 Reviewed by: nkinder (Thanks!)
Diffstat (limited to 'ldap/servers/slapd/tools/dbscan.c')
-rw-r--r--ldap/servers/slapd/tools/dbscan.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ldap/servers/slapd/tools/dbscan.c b/ldap/servers/slapd/tools/dbscan.c
index dfe811e1..0c36ddce 100644
--- a/ldap/servers/slapd/tools/dbscan.c
+++ b/ldap/servers/slapd/tools/dbscan.c
@@ -814,7 +814,7 @@ display_entryrdn_self(DB *db, ID id, const char *nrdn, int indent)
rc = cursor->c_get(cursor, &key, &data, DB_SET);
if (rc) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key.data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key.data, db_strerror(rc), rc);
goto bail;
}
@@ -859,7 +859,7 @@ display_entryrdn_parent(DB *db, ID id, const char *nrdn, int indent)
rc = cursor->c_get(cursor, &key, &data, DB_SET);
if (rc) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key.data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key.data, db_strerror(rc), rc);
goto bail;
}
@@ -908,10 +908,10 @@ display_entryrdn_children(DB *db, ID id, const char *nrdn, int indent)
fprintf(stderr, "Entryrdn index is corrupt; "
"data item for key %s is too large for our "
"buffer (need=%d actual=%d)\n",
- key.data, data.size, data.ulen);
+ (char *)key.data, data.size, data.ulen);
} else if (rc != DB_NOTFOUND) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key.data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key.data, db_strerror(rc), rc);
}
goto bail;
}
@@ -932,10 +932,10 @@ display_entryrdn_children(DB *db, ID id, const char *nrdn, int indent)
fprintf(stderr, "Entryrdn index is corrupt; "
"data item for key %s is too large for our "
"buffer (need=%d actual=%d)\n",
- key.data, data.size, data.ulen);
+ (char *)key.data, data.size, data.ulen);
} else if (rc != DB_NOTFOUND) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key.data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key.data, db_strerror(rc), rc);
}
}
bail:
@@ -961,7 +961,7 @@ display_entryrdn_item(DB *db, DBC *cursor, DBT *key)
rc = cursor->c_get(cursor, key, &data, DB_SET);
if (rc) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key->data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key->data, db_strerror(rc), rc);
return;
}
@@ -986,12 +986,12 @@ next:
fprintf(stderr, "Entryrdn index is corrupt; "
"data item for key %s is too large for our "
"buffer (need=%d actual=%d)\n",
- key->data, data.size, data.ulen);
+ (char *)key->data, data.size, data.ulen);
} else {
if (rc != DB_NOTFOUND) {
fprintf(stderr, "Failed to position cursor "
"at the key: %s: %s (%d)\n",
- key->data, db_strerror(rc), rc);
+ (char *)key->data, db_strerror(rc), rc);
}
}
goto bail;
@@ -1021,11 +1021,11 @@ next:
fprintf(stderr, "Entryrdn index is corrupt; "
"data item for key %s is too large for our "
"buffer (need=%d actual=%d)\n",
- key->data, data.size, data.ulen);
+ (char *)key->data, data.size, data.ulen);
goto bail;
} else if (rc != DB_NOTFOUND) {
fprintf(stderr, "Failed to position cursor at the key: %s: %s "
- "(%d)\n", key->data, db_strerror(rc), rc);
+ "(%d)\n", (char *)key->data, db_strerror(rc), rc);
goto bail;
}
flags = DB_NEXT|DB_MULTIPLE;