summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-11-21 13:06:00 -0800
committerJeremy Allison <jra@samba.org>2011-11-21 23:39:08 +0100
commit3e6e1aed949a4483fc38607e443b5c8b715aca3b (patch)
tree631d089cbae788cd8c68442774bdc6720dbc07ab /lib
parentaa2e415442fe121a3db5fa79e53ad732d78e9572 (diff)
downloadsamba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.tar.gz
samba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.tar.bz2
samba-3e6e1aed949a4483fc38607e443b5c8b715aca3b.zip
Fix a bunch of "warning: variable ‘XXXX’ set but not used [-Wunused-but-set-variable]" warnings from the new gcc.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb/tools/tdbtool.c4
-rw-r--r--lib/util/util_runcmd.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/tdb/tools/tdbtool.c b/lib/tdb/tools/tdbtool.c
index 99d4841cf3..d4b85dcdb1 100644
--- a/lib/tdb/tools/tdbtool.c
+++ b/lib/tdb/tools/tdbtool.c
@@ -448,11 +448,9 @@ static void speed_tdb(const char *tlimit)
_start_timer();
do {
long int r = random();
- TDB_DATA key, dbuf;
+ TDB_DATA key;
key.dptr = discard_const_p(uint8_t, str);
key.dsize = strlen((char *)key.dptr);
- dbuf.dptr = (uint8_t *) &r;
- dbuf.dsize = sizeof(r);
tdb_fetch(tdb, key);
t = _end_timer();
ops++;
diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c
index d617254432..cfe0034a32 100644
--- a/lib/util/util_runcmd.c
+++ b/lib/util/util_runcmd.c
@@ -74,7 +74,6 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
struct samba_runcmd_state *state;
int p1[2], p2[2];
char **argv;
- int ret;
va_list ap;
req = tevent_req_create(mem_ctx, &state,
@@ -187,7 +186,7 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
}
va_end(ap);
- ret = execvp(state->arg0, argv);
+ (void)execvp(state->arg0, argv);
fprintf(stderr, "Failed to exec child - %s\n", strerror(errno));
_exit(255);
return NULL;