From 1c4bbe06549d86614318718a45b9bc48e3bfc81f Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 2 May 2005 17:49:43 +0000 Subject: r6586: get rid of a few more compiler warnings (This used to be commit 173375f8d88bf8e8db8d60e5d5f0e5dcc28767d9) --- source3/torture/denytest.c | 4 ++-- source3/torture/mangle_test.c | 3 ++- source3/torture/torture.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'source3/torture') diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c index 89b0fdf93f..a130b59815 100644 --- a/source3/torture/denytest.c +++ b/source3/torture/denytest.c @@ -1556,8 +1556,8 @@ BOOL torture_denytest2(int dummy) resultstr(denytable2[i].result)); } - cli_close(cli1, fnum1); - cli_close(cli2, fnum2); + if (fnum1 != -1) cli_close(cli1, fnum1); + if (fnum2 != -1) cli_close(cli2, fnum2); } for (i=0;i<2;i++) { diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 5acad2d015..df0855d93d 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -20,6 +20,8 @@ #include "includes.h" +extern int torture_numops; + static TDB_CONTEXT *tdb; #define NAME_LENGTH 20 @@ -159,7 +161,6 @@ static void gen_name(char *name) BOOL torture_mangle(int dummy) { - extern int torture_numops; static struct cli_state *cli; int i; BOOL ret = True; diff --git a/source3/torture/torture.c b/source3/torture/torture.c index b1ed1e4e37..ef9497d9ad 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -22,6 +22,9 @@ #include "includes.h" +extern char *optarg; +extern int optind; + static fstring host, workgroup, share, password, username, myname; static int max_protocol = PROTOCOL_NT1; static const char *sockops="TCP_NODELAY"; @@ -4902,8 +4905,6 @@ static void usage(void) char *p; int gotuser = 0; int gotpass = 0; - extern char *optarg; - extern int optind; BOOL correct = True; dbf = x_stdout; -- cgit