From: Andreas Schneider Date: Mon, 20 May 2019 14:07:08 +0000 (+0200) Subject: s3:utils: Only declare variables if we're gonna use them X-Git-Tag: ldb-2.0.5~638 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de926429413f2440d185681586427a9e77c81a7f;p=thirdparty%2Fsamba.git s3:utils: Only declare variables if we're gonna use them Found by covscan. Signed-off-by: Andreas Schneider Reviewed-by: Gary Lockyer --- diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 1a2a0ec3ed5..7a761a6ff59 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -415,9 +415,11 @@ static bool do_sleep(struct tevent_context *ev_ctx, const struct server_id pid, const int argc, const char **argv) { +#if defined(DEVELOPER) && defined(ENABLE_SELFTEST) unsigned int seconds; long input; const long MAX_SLEEP = 60 * 60; /* One hour maximum sleep */ +#endif if (argc != 2) { fprintf(stderr, "Usage: smbcontrol sleep seconds\n");