From 3e6e1aed949a4483fc38607e443b5c8b715aca3b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 21 Nov 2011 13:06:00 -0800 Subject: Fix a bunch of "warning: variable ‘XXXX’ set but not used [-Wunused-but-set-variable]" warnings from the new gcc. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Autobuild-User: Jeremy Allison Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104 --- lib/tdb/tools/tdbtool.c | 4 +--- lib/util/util_runcmd.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') 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; -- cgit