summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-28 13:40:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:55 -0500
commitba6d5fcb97b9831dddf7dfe09fb02fbb23d864b4 (patch)
treed0c75ce4b6f66580bbabdcc82e4d930bd05d9a0a
parenta6ae640313a47ac2950c0948e4385fa934a5ef09 (diff)
downloadsamba-ba6d5fcb97b9831dddf7dfe09fb02fbb23d864b4.tar.gz
samba-ba6d5fcb97b9831dddf7dfe09fb02fbb23d864b4.tar.bz2
samba-ba6d5fcb97b9831dddf7dfe09fb02fbb23d864b4.zip
r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52223cafa28470f264f0b60646a07a01)
-rw-r--r--source4/torture/auth/ntlmssp.c2
-rw-r--r--source4/torture/basic/aliases.c2
-rw-r--r--source4/torture/basic/attr.c2
-rw-r--r--source4/torture/basic/charset.c2
-rw-r--r--source4/torture/basic/delete.c2
-rw-r--r--source4/torture/basic/denytest.c6
-rw-r--r--source4/torture/basic/dfstest.c4
-rw-r--r--source4/torture/basic/dir.c4
-rw-r--r--source4/torture/basic/locking.c14
-rw-r--r--source4/torture/basic/mangle_test.c4
-rw-r--r--source4/torture/basic/rename.c2
-rw-r--r--source4/torture/basic/scanner.c6
-rw-r--r--source4/torture/basic/secleak.c2
-rw-r--r--source4/torture/basic/utable.c4
-rw-r--r--source4/torture/ldap/basic.c2
-rw-r--r--source4/torture/local/binding_string.c2
-rw-r--r--source4/torture/local/iconv.c6
-rw-r--r--source4/torture/local/idtree.c2
-rw-r--r--source4/torture/local/messaging.c2
-rw-r--r--source4/torture/local/talloc.c2
-rw-r--r--source4/torture/nbench/nbench.c4
-rw-r--r--source4/torture/rap/rap.c2
-rw-r--r--source4/torture/raw/chkpath.c2
-rw-r--r--source4/torture/raw/close.c2
-rw-r--r--source4/torture/raw/context.c2
-rw-r--r--source4/torture/raw/ioctl.c2
-rw-r--r--source4/torture/raw/lock.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/mux.c2
-rw-r--r--source4/torture/raw/notify.c2
-rw-r--r--source4/torture/raw/open.c2
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/raw/qfileinfo.c2
-rw-r--r--source4/torture/raw/qfsinfo.c2
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/raw/rename.c2
-rw-r--r--source4/torture/raw/search.c2
-rw-r--r--source4/torture/raw/seek.c2
-rw-r--r--source4/torture/raw/setfileinfo.c4
-rw-r--r--source4/torture/raw/unlink.c2
-rw-r--r--source4/torture/raw/write.c2
-rw-r--r--source4/torture/rpc/atsvc.c2
-rw-r--r--source4/torture/rpc/autoidl.c2
-rw-r--r--source4/torture/rpc/bind.c2
-rw-r--r--source4/torture/rpc/countcalls.c2
-rw-r--r--source4/torture/rpc/dcom.c2
-rw-r--r--source4/torture/rpc/dfs.c6
-rw-r--r--source4/torture/rpc/drsuapi.c2
-rw-r--r--source4/torture/rpc/echo.c5
-rw-r--r--source4/torture/rpc/epmapper.c2
-rw-r--r--source4/torture/rpc/eventlog.c2
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/rpc/mgmt.c2
-rw-r--r--source4/torture/rpc/netlogon.c2
-rw-r--r--source4/torture/rpc/oxidresolve.c2
-rw-r--r--source4/torture/rpc/samr.c2
-rw-r--r--source4/torture/rpc/scanner.c2
-rw-r--r--source4/torture/rpc/schannel.c2
-rw-r--r--source4/torture/rpc/spoolss.c26
-rw-r--r--source4/torture/rpc/srvsvc.c2
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/winreg.c2
-rw-r--r--source4/torture/rpc/wkssvc.c2
-rw-r--r--source4/torture/torture.c53
64 files changed, 127 insertions, 119 deletions
diff --git a/source4/torture/auth/ntlmssp.c b/source4/torture/auth/ntlmssp.c
index a10ca77c53..e98fe789b8 100644
--- a/source4/torture/auth/ntlmssp.c
+++ b/source4/torture/auth/ntlmssp.c
@@ -20,7 +20,7 @@
#include "includes.h"
-BOOL torture_ntlmssp_self_check(int dummy)
+BOOL torture_ntlmssp_self_check(void)
{
struct ntlmssp_state *ntlmssp_state;
DATA_BLOB data;
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 1cc5b3f39b..4f63b366a5 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -379,7 +379,7 @@ static void setpathinfo_aliases(struct smbcli_state *cli)
/* look for aliased info levels in trans2 calls */
-BOOL torture_trans2_aliases(int dummy)
+BOOL torture_trans2_aliases(void)
{
struct smbcli_state *cli;
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index df93efaeaf..b70b1c2617 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -84,7 +84,7 @@ static const struct trunc_open_results attr_results[] = {
};
-BOOL torture_openattrtest(int dummy)
+BOOL torture_openattrtest(void)
{
struct smbcli_state *cli1;
const char *fname = "\\openattr.file";
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index d36c9f5b91..090303ac30 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -225,7 +225,7 @@ static BOOL test_widea(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_charset(int dummy)
+BOOL torture_charset(void)
{
static struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 225a73736e..742a51bcaa 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -26,7 +26,7 @@
/*
Test delete on close semantics.
*/
-BOOL torture_test_delete(int dummy)
+BOOL torture_test_delete(void)
{
struct smbcli_state *cli1;
struct smbcli_state *cli2 = NULL;
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index b8ee5890e5..6dd38e8e79 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1406,7 +1406,7 @@ static void progress_bar(uint_t i, uint_t total)
/*
this produces a matrix of deny mode behaviour for 1 connection
*/
-BOOL torture_denytest1(int dummy)
+BOOL torture_denytest1(void)
{
static struct smbcli_state *cli1;
int fnum1, fnum2;
@@ -1505,7 +1505,7 @@ failed:
/*
this produces a matrix of deny mode behaviour with 2 connections
*/
-BOOL torture_denytest2(int dummy)
+BOOL torture_denytest2(void)
{
static struct smbcli_state *cli1, *cli2;
int fnum1, fnum2;
@@ -1606,7 +1606,7 @@ failed:
/*
simple test harness for playing with deny modes
*/
-BOOL torture_denytest3(int dummy)
+BOOL torture_denytest3(void)
{
struct smbcli_state *cli1, *cli2;
int fnum1, fnum2;
diff --git a/source4/torture/basic/dfstest.c b/source4/torture/basic/dfstest.c
index eb2d517f6d..078aa00512 100644
--- a/source4/torture/basic/dfstest.c
+++ b/source4/torture/basic/dfstest.c
@@ -29,7 +29,7 @@ static const char *sockops="TCP_NODELAY";
/*
checks for correct DFS cluster support
*/
-BOOL torture_dfs_basic(int dummy)
+BOOL torture_dfs_basic(void)
{
int current_server = 0;
char *fname[DFS_FILE_COUNT];
@@ -357,7 +357,7 @@ void dfs_list_fn(file_info *finfo, const char *name, void* parmsp)
#define DFS_RANDOM_FILE_COUNT 10
#define DFS_RANDOM_DIR_COUNT 3
#define DFS_RANDOM_DIR_LEVELS 2
-BOOL torture_dfs_random(int dummy)
+BOOL torture_dfs_random(void)
{
char *fname[DFS_RANDOM_FILE_COUNT];
int file_server[DFS_RANDOM_FILE_COUNT];
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index de2944e7fe..d34e064580 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -30,7 +30,7 @@ static void list_fn(file_info *finfo, const char *name, void *state)
/*
test directory listing speed
*/
-BOOL torture_dirtest1(int dummy)
+BOOL torture_dirtest1(void)
{
int i;
struct smbcli_state *cli;
@@ -86,7 +86,7 @@ BOOL torture_dirtest1(int dummy)
return correct;
}
-BOOL torture_dirtest2(int dummy)
+BOOL torture_dirtest2(void)
{
int i;
struct smbcli_state *cli;
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index 387daa3101..9683557ca8 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -30,7 +30,7 @@
must not use posix semantics)
2) support for lock timeouts
*/
-BOOL torture_locktest1(int dummy)
+BOOL torture_locktest1(void)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\lockt1.lck";
@@ -184,7 +184,7 @@ BOOL torture_locktest1(int dummy)
3) the server denies unlock requests by an incorrect client PID
*/
-BOOL torture_locktest2(int dummy)
+BOOL torture_locktest2(void)
{
struct smbcli_state *cli;
const char *fname = "\\lockt2.lck";
@@ -322,7 +322,7 @@ BOOL torture_locktest2(int dummy)
1) the server supports the full offset range in lock requests
*/
-BOOL torture_locktest3(int dummy)
+BOOL torture_locktest3(void)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\lockt3.lck";
@@ -454,7 +454,7 @@ BOOL torture_locktest3(int dummy)
/*
looks at overlapping locks
*/
-BOOL torture_locktest4(int dummy)
+BOOL torture_locktest4(void)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\lockt4.lck";
@@ -622,7 +622,7 @@ BOOL torture_locktest4(int dummy)
/*
looks at lock upgrade/downgrade.
*/
-BOOL torture_locktest5(int dummy)
+BOOL torture_locktest5(void)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\lockt5.lck";
@@ -743,7 +743,7 @@ ret = NT_STATUS_IS_OK(smbcli_unlock(cli1->tree, fnum1, 0, 4)) &&
/*
tries the unusual lockingX locktype bits
*/
-BOOL torture_locktest6(int dummy)
+BOOL torture_locktest6(void)
{
struct smbcli_state *cli;
const char *fname[1] = { "\\lock6.txt" };
@@ -781,7 +781,7 @@ BOOL torture_locktest6(int dummy)
return True;
}
-BOOL torture_locktest7(int dummy)
+BOOL torture_locktest7(void)
{
struct smbcli_state *cli1;
const char *fname = "\\lockt7.lck";
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index c0c77f950f..8c4f5514a6 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -96,7 +96,7 @@ static BOOL test_one(struct smbcli_state *cli, const char *name)
} else {
TDB_DATA namedata;
/* store it for later */
- namedata.dptr = name;
+ namedata.dptr = discard_const_p(char, name);
namedata.dsize = strlen(name)+1;
tdb_store_bystring(tdb, shortname, namedata, TDB_REPLACE);
}
@@ -148,7 +148,7 @@ static void gen_name(char *name)
}
-BOOL torture_mangle(int dummy)
+BOOL torture_mangle(void)
{
extern int torture_numops;
static struct smbcli_state *cli;
diff --git a/source4/torture/basic/rename.c b/source4/torture/basic/rename.c
index f9caea0665..e26c85b5df 100644
--- a/source4/torture/basic/rename.c
+++ b/source4/torture/basic/rename.c
@@ -25,7 +25,7 @@
/*
Test rename on files open with share delete and no share delete.
*/
-BOOL torture_test_rename(int dummy)
+BOOL torture_test_rename(void)
{
struct smbcli_state *cli1;
const char *fname = "\\test.txt";
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index f4ebd5dacd..cd53cb3979 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -236,7 +236,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
}
-BOOL torture_trans2_scan(int dummy)
+BOOL torture_trans2_scan(void)
{
static struct smbcli_state *cli;
int op, level;
@@ -475,7 +475,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
}
-BOOL torture_nttrans_scan(int dummy)
+BOOL torture_nttrans_scan(void)
{
static struct smbcli_state *cli;
int op, level;
@@ -515,7 +515,7 @@ BOOL torture_nttrans_scan(int dummy)
/* scan for valid base SMB requests */
-BOOL torture_smb_scan(int dummy)
+BOOL torture_smb_scan(void)
{
static struct smbcli_state *cli;
int op;
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 998faec54e..c3c8dcbb13 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -46,7 +46,7 @@ static BOOL try_failed_login(struct smbcli_state *cli)
return True;
}
-BOOL torture_sec_leak(int dummy)
+BOOL torture_sec_leak(void)
{
struct smbcli_state *cli;
time_t t1 = time(NULL);
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index 8047e5a468..900f0be830 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -20,7 +20,7 @@
#include "includes.h"
-BOOL torture_utable(int dummy)
+BOOL torture_utable(void)
{
struct smbcli_state *cli;
fstring fname;
@@ -114,7 +114,7 @@ static char *form_name(int c)
return fname;
}
-BOOL torture_casetable(int dummy)
+BOOL torture_casetable(void)
{
static struct smbcli_state *cli;
char *fname;
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index 574b01b226..4a0ae772d2 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -180,7 +180,7 @@ static BOOL test_compare_sasl(struct ldap_connection *conn, const char *basedn)
return ret;
}
-BOOL torture_ldap_basic(int dummy)
+BOOL torture_ldap_basic(void)
{
NTSTATUS status;
struct ldap_connection *conn;
diff --git a/source4/torture/local/binding_string.c b/source4/torture/local/binding_string.c
index 0fd1b4fb56..da9478c6d8 100644
--- a/source4/torture/local/binding_string.c
+++ b/source4/torture/local/binding_string.c
@@ -114,7 +114,7 @@ static const char *test_strings[] = {
"ncacn_unix_stream:[/tmp/epmapper,sign]",
};
-BOOL torture_local_binding_string(int dummy)
+BOOL torture_local_binding_string(void)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_init("test_BindingString");
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 606ac3da5d..2c2a9564bf 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -158,7 +158,7 @@ static int test_buffer(uint8_t *inbuf, size_t size, const char *charset)
memset(ptr_out, 0, outsize2);
errno = 0;
- ret2 = iconv(cd, &ptr_in, &size_in2, &ptr_out, &outsize2);
+ ret2 = iconv(cd, discard_const_p(char *, &ptr_in), &size_in2, &ptr_out, &outsize2);
errno2 = errno;
len1 = sizeof(buf1) - outsize1;
@@ -293,7 +293,7 @@ static int test_codepoint(unsigned int codepoint)
return 1;
}
-BOOL torture_local_iconv(int dummy)
+BOOL torture_local_iconv(void)
{
size_t size;
unsigned char inbuf[1000];
@@ -351,7 +351,7 @@ BOOL torture_local_iconv(int dummy)
#else
-BOOL torture_local_iconv(int dummy)
+BOOL torture_local_iconv(void)
{
printf("No native iconv library - can't run iconv test\n");
return True;
diff --git a/source4/torture/local/idtree.c b/source4/torture/local/idtree.c
index 36360b5917..7d0e3e84a8 100644
--- a/source4/torture/local/idtree.c
+++ b/source4/torture/local/idtree.c
@@ -22,7 +22,7 @@
#include "includes.h"
-BOOL torture_local_idtree(int dummy)
+BOOL torture_local_idtree(void)
{
struct idr_context *idr;
int i;
diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c
index 18c4d9b03f..c0dab06cca 100644
--- a/source4/torture/local/messaging.c
+++ b/source4/torture/local/messaging.c
@@ -133,7 +133,7 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx)
return ret;
}
-BOOL torture_local_messaging(int dummy)
+BOOL torture_local_messaging(void)
{
TALLOC_CTX *mem_ctx = talloc_init("torture_local_messaging");
BOOL ret = True;
diff --git a/source4/torture/local/talloc.c b/source4/torture/local/talloc.c
index eca7e55483..332312200a 100644
--- a/source4/torture/local/talloc.c
+++ b/source4/torture/local/talloc.c
@@ -679,7 +679,7 @@ static BOOL test_speed(void)
}
-BOOL torture_local_talloc(int dummy)
+BOOL torture_local_talloc(void)
{
BOOL ret = True;
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index a649b5fa15..0b4bf4bbf1 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -162,7 +162,7 @@ done:
/* run a test that simulates an approximate netbench client load */
-BOOL torture_nbench(int dummy)
+BOOL torture_nbench(void)
{
BOOL correct = True;
extern int torture_nprocs;
@@ -193,7 +193,7 @@ BOOL torture_nbench(int dummy)
printf("Running for %d seconds with load '%s' and warmup %d secs\n",
timelimit, loadfile, warmup);
- signal(SIGALRM, SIGNAL_CAST nb_alarm);
+ signal(SIGALRM, nb_alarm);
alarm(1);
torture_create_procs(run_netbench, &correct);
alarm(0);
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 407aadbc0e..a74acdb331 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -423,7 +423,7 @@ static BOOL test_rap(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return res;
}
-BOOL torture_raw_rap(int dummy)
+BOOL torture_raw_rap(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index 38684add60..20bb3f8ebd 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -210,7 +210,7 @@ done:
/*
basic testing of chkpath calls
*/
-BOOL torture_raw_chkpath(int dummy)
+BOOL torture_raw_chkpath(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 1007226ded..7a53c9be4a 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -23,7 +23,7 @@
/* basic testing of all RAW_CLOSE_* calls
*/
-BOOL torture_raw_close(int dummy)
+BOOL torture_raw_close(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 95c2a2c378..c1cf860a8d 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -400,7 +400,7 @@ done:
/*
basic testing of session/tree context calls
*/
-BOOL torture_raw_context(int dummy)
+BOOL torture_raw_context(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index d433eaa637..fedb6c71f0 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -129,7 +129,7 @@ done:
/*
basic testing of some ioctl calls
*/
-BOOL torture_raw_ioctl(int dummy)
+BOOL torture_raw_ioctl(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index 9e7a15f1dc..abedcd171e 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -664,7 +664,7 @@ done:
/*
basic testing of lock calls
*/
-BOOL torture_raw_lock(int dummy)
+BOOL torture_raw_lock(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index 48c4853554..2d7fa678e1 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -119,7 +119,7 @@ done:
/*
basic testing of all RAW_MKDIR_* calls
*/
-BOOL torture_raw_mkdir(int dummy)
+BOOL torture_raw_mkdir(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c
index 1554206455..69118fdf09 100644
--- a/source4/torture/raw/mux.c
+++ b/source4/torture/raw/mux.c
@@ -251,7 +251,7 @@ done:
/*
basic testing of multiplexing notify
*/
-BOOL torture_raw_mux(int dummy)
+BOOL torture_raw_mux(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index aec92bf641..3fff04fc6f 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -50,7 +50,7 @@
/*
basic testing of change notify
*/
-BOOL torture_raw_notify(int dummy)
+BOOL torture_raw_notify(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 13f806ba16..89c686448f 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -973,7 +973,7 @@ done:
/* basic testing of all RAW_OPEN_* calls
*/
-BOOL torture_raw_open(int dummy)
+BOOL torture_raw_open(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 4b531a6950..51e6a5de6c 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -327,7 +327,7 @@ done:
/*
basic testing of oplocks
*/
-BOOL torture_raw_oplock(int dummy)
+BOOL torture_raw_oplock(void)
{
struct smbcli_state *cli1;
BOOL ret = True;
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index 3e62cc8493..99f1dd7a38 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -147,7 +147,7 @@ static union smb_fileinfo *fname_find(const char *name)
for each call we test that it succeeds, and where possible test
for consistency between the calls.
*/
-BOOL torture_raw_qfileinfo(int dummy)
+BOOL torture_raw_qfileinfo(void)
{
struct smbcli_state *cli;
int i;
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index 10b9605147..998dbc40cc 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -107,7 +107,7 @@ static union smb_fsinfo *find(const char *name)
Some of the consistency tests assume that the target filesystem is
quiescent, which is sometimes hard to achieve
*/
-BOOL torture_raw_qfsinfo(int dummy)
+BOOL torture_raw_qfsinfo(void)
{
struct smbcli_state *cli;
int i;
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 9b70fb989e..9d7b2e3fe3 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -714,7 +714,7 @@ done:
/*
basic testing of read calls
*/
-BOOL torture_raw_read(int dummy)
+BOOL torture_raw_read(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index e75d9d0fc7..f80d6e1308 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -361,7 +361,7 @@ done:
/*
basic testing of rename calls
*/
-BOOL torture_raw_rename(int dummy)
+BOOL torture_raw_rename(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index 04c1f8db57..8a8e4cc0f9 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -1078,7 +1078,7 @@ done:
/*
basic testing of all RAW_SEARCH_* calls using a single file
*/
-BOOL torture_raw_search(int dummy)
+BOOL torture_raw_search(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index b78efc0da4..94f0ba2385 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -231,7 +231,7 @@ done:
/*
basic testing of seek calls
*/
-BOOL torture_raw_seek(int dummy)
+BOOL torture_raw_seek(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 2f86a32261..f4baf1f020 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -26,7 +26,7 @@
for each call we test that it succeeds, and where possible test
for consistency between the calls.
*/
-BOOL torture_raw_sfileinfo(int dummy)
+BOOL torture_raw_sfileinfo(void)
{
struct smbcli_state *cli;
BOOL ret = True;
@@ -516,7 +516,7 @@ done:
/*
look for the w2k3 setpathinfo STANDARD bug
*/
-BOOL torture_raw_sfileinfo_bug(int dummy)
+BOOL torture_raw_sfileinfo_bug(void)
{
struct smbcli_state *cli;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index b67837b598..40ab137fa0 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -168,7 +168,7 @@ done:
/*
basic testing of unlink calls
*/
-BOOL torture_raw_unlink(int dummy)
+BOOL torture_raw_unlink(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 6ac92af528..965911dc1a 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -913,7 +913,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
/*
basic testing of write calls
*/
-BOOL torture_raw_write(int dummy)
+BOOL torture_raw_write(void)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 6b1e558902..52ac53e58b 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -132,7 +132,7 @@ static BOOL test_JobAdd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_rpc_atsvc(int dummy)
+BOOL torture_rpc_atsvc(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 8ec4a19787..b8e18affb5 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -254,7 +254,7 @@ static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta
test_scan_call(mem_ctx, iface, 2);
}
-BOOL torture_rpc_autoidl(int dummy)
+BOOL torture_rpc_autoidl(void)
{
TALLOC_CTX *mem_ctx;
const struct dcerpc_interface_table *iface;
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index 6602a9bcfd..a4f3030bf6 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -33,7 +33,7 @@
*/
-BOOL torture_multi_bind(int dummy)
+BOOL torture_multi_bind(void)
{
struct dcerpc_pipe *p;
const char *domain = lp_parm_string(-1, "torture", "userdomain");
diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c
index 99dc4d3e42..c914622061 100644
--- a/source4/torture/rpc/countcalls.c
+++ b/source4/torture/rpc/countcalls.c
@@ -23,7 +23,7 @@
#include "includes.h"
-BOOL torture_rpc_countcalls(int dummy)
+BOOL torture_rpc_countcalls(void)
{
const struct dcerpc_interface_table *iface;
NTSTATUS status;
diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c
index 8ff47a363d..13f24c9d00 100644
--- a/source4/torture/rpc/dcom.c
+++ b/source4/torture/rpc/dcom.c
@@ -21,7 +21,7 @@
#include "includes.h"
-BOOL torture_rpc_dcom(int dummy)
+BOOL torture_rpc_dcom(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index e19a4f0da3..ed7e3ec3a9 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -130,7 +130,7 @@ static BOOL test_Enum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return ret;
}
-
+#if 0
static BOOL test_Add(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
@@ -161,9 +161,9 @@ static BOOL test_Add(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
+#endif
-
-BOOL torture_rpc_dfs(int dummy)
+BOOL torture_rpc_dfs(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index be1582e57f..9981b24258 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -421,7 +421,7 @@ static BOOL test_DsUnbind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-BOOL torture_rpc_drsuapi(int dummy)
+BOOL torture_rpc_drsuapi(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 7d12c1b7f3..342255f102 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -207,7 +207,7 @@ static BOOL test_testcall2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return ret;
}
-
+#if 0
/*
test the TestSleep interface
*/
@@ -259,8 +259,9 @@ static BOOL test_sleep(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return ret;
}
+#endif
-BOOL torture_rpc_echo(int dummy)
+BOOL torture_rpc_echo(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index d55355cb31..b1076e64c6 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -248,7 +248,7 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_rpc_epmapper(int dummy)
+BOOL torture_rpc_epmapper(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 343c81e385..dfa9fc7a51 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -144,7 +144,7 @@ static BOOL test_OpenEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct
return True;
}
-BOOL torture_rpc_eventlog(int dummy)
+BOOL torture_rpc_eventlog(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 022c5a85b1..ed82c731bb 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -868,7 +868,7 @@ static BOOL test_Close(struct dcerpc_pipe *p,
return True;
}
-BOOL torture_rpc_lsa(int dummy)
+BOOL torture_rpc_lsa(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index cd04d0be4f..4340bde691 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -172,7 +172,7 @@ static BOOL test_stop_server_listening(struct dcerpc_pipe *p,
}
-BOOL torture_rpc_mgmt(int dummy)
+BOOL torture_rpc_mgmt(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 881d413b5c..7ddd8da0a7 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1728,7 +1728,7 @@ static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
-BOOL torture_rpc_netlogon(int dummy)
+BOOL torture_rpc_netlogon(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 476d140842..4acaaeecc0 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -82,7 +82,7 @@ static int test_ServerAlive2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return 1;
}
-BOOL torture_rpc_oxidresolve(int dummy)
+BOOL torture_rpc_oxidresolve(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 9c63e654a3..544d147a17 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3153,7 +3153,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_rpc_samr(int dummy)
+BOOL torture_rpc_samr(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index 4bc8b88ba5..f93ea0419a 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -127,7 +127,7 @@ static BOOL test_inq_if_ids(struct dcerpc_pipe *p,
}
-BOOL torture_rpc_scanner(int dummy)
+BOOL torture_rpc_scanner(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index f6c94b145a..c41fe19506 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -108,7 +108,7 @@ failed:
/*
a schannel test suite
*/
-BOOL torture_rpc_schannel(int dummy)
+BOOL torture_rpc_schannel(void)
{
TALLOC_CTX *mem_ctx;
BOOL ret = True;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index db0f1bc1a9..939c13a937 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -88,7 +88,8 @@ static BOOL test_ClosePrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_GetForm(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *formname)
+ struct policy_handle *handle,
+ const char *formname)
{
NTSTATUS status;
struct spoolss_GetForm r;
@@ -190,7 +191,8 @@ static BOOL test_EnumForms(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_DeleteForm(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *formname)
+ struct policy_handle *handle,
+ const char *formname)
{
NTSTATUS status;
struct spoolss_DeleteForm r;
@@ -466,7 +468,8 @@ static BOOL test_EnumJobs(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_GetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *value_name)
+ struct policy_handle *handle,
+ const char *value_name)
{
NTSTATUS status;
struct spoolss_GetPrinterData r;
@@ -501,8 +504,9 @@ static BOOL test_GetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_GetPrinterDataEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *key_name,
- char *value_name)
+ struct policy_handle *handle,
+ const char *key_name,
+ const char *value_name)
{
NTSTATUS status;
struct spoolss_GetPrinterDataEx r;
@@ -586,7 +590,8 @@ static BOOL test_EnumPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
static BOOL test_DeletePrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *value_name)
+ struct policy_handle *handle,
+ const char *value_name)
{
NTSTATUS status;
struct spoolss_DeletePrinterData r;
@@ -611,8 +616,8 @@ static BOOL test_SetPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct spoolss_SetPrinterData r;
- char *value_name = "spottyfoot";
-
+ const char *value_name = "spottyfoot";
+
r.in.handle = handle;
r.in.value_name = value_name;
r.in.type = 0;
@@ -888,7 +893,8 @@ static BOOL test_EnumPrinters(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
static BOOL test_GetPrinterDriver2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct policy_handle *handle, char *driver_name)
+ struct policy_handle *handle,
+ const char *driver_name)
{
NTSTATUS status;
struct spoolss_GetPrinterDriver2 r;
@@ -1018,7 +1024,7 @@ static BOOL test_EnumPrinterDrivers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return ret;
}
-BOOL torture_rpc_spoolss(int dummy)
+BOOL torture_rpc_spoolss(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 8fa4f049b4..53cf2a7b61 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -679,7 +679,7 @@ static BOOL test_NetRemoteTOD(struct dcerpc_pipe *p,
return ret;
}
-BOOL torture_rpc_srvsvc(int dummy)
+BOOL torture_rpc_srvsvc(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 6fd80f5fa7..148ed38e5f 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -105,7 +105,7 @@ static BOOL test_CloseServiceHandle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return True;
}
-BOOL torture_rpc_svcctl(int dummy)
+BOOL torture_rpc_svcctl(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 40adb758a7..139da7f574 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -544,7 +544,7 @@ static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, void *fn)
return ret;
}
-BOOL torture_rpc_winreg(int dummy)
+BOOL torture_rpc_winreg(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 4768163d5c..d8552d5fa2 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -83,7 +83,7 @@ static BOOL test_NetWkstaTransportEnum(struct dcerpc_pipe *p,
-BOOL torture_rpc_wkssvc(int dummy)
+BOOL torture_rpc_wkssvc(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index dfc6d6871e..713e4cd6f1 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -529,7 +529,7 @@ static BOOL rw_torture2(struct smbcli_state *c1, struct smbcli_state *c2)
return correct;
}
-static BOOL run_readwritetest(int dummy)
+static BOOL run_readwritetest(void)
{
struct smbcli_state *cli1, *cli2;
BOOL test1, test2 = True;
@@ -577,7 +577,7 @@ static BOOL run_readwritemulti(struct smbcli_state *cli, int dummy)
this checks to see if a secondary tconx can use open files from an
earlier tconx
*/
-static BOOL run_tcon_test(int dummy)
+static BOOL run_tcon_test(void)
{
struct smbcli_state *cli;
const char *fname = "\\tcontest.tmp";
@@ -732,7 +732,7 @@ static BOOL tcon_devtest(struct smbcli_state *cli,
/*
checks for correct tconX support
*/
-static BOOL run_tcon_devtype_test(int dummy)
+static BOOL run_tcon_devtype_test(void)
{
struct smbcli_state *cli1 = NULL;
BOOL retry;
@@ -800,7 +800,7 @@ static BOOL run_tcon_devtype_test(int dummy)
test whether fnums and tids open on one VC are available on another (a major
security hole)
*/
-static BOOL run_fdpasstest(int dummy)
+static BOOL run_fdpasstest(void)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\fdpass.tst";
@@ -861,7 +861,7 @@ static BOOL run_fdpasstest(int dummy)
1) the server does not allow an unlink on a file that is open
*/
-static BOOL run_unlinktest(int dummy)
+static BOOL run_unlinktest(void)
{
struct smbcli_state *cli;
const char *fname = "\\unlink.tst";
@@ -1080,7 +1080,7 @@ static BOOL run_maxfidtest(struct smbcli_state *cli, int dummy)
}
/* send smb negprot commands, not reading the response */
-static BOOL run_negprot_nowait(int dummy)
+static BOOL run_negprot_nowait(void)
{
int i;
struct smbcli_state *cli, *cli2;
@@ -1144,7 +1144,7 @@ static BOOL run_negprot_nowait(int dummy)
/*
This checks how the getatr calls works
*/
-static BOOL run_attrtest(int dummy)
+static BOOL run_attrtest(void)
{
struct smbcli_state *cli;
int fnum;
@@ -1215,7 +1215,7 @@ static BOOL run_attrtest(int dummy)
/*
This checks a couple of trans2 calls
*/
-static BOOL run_trans2test(int dummy)
+static BOOL run_trans2test(void)
{
struct smbcli_state *cli;
int fnum;
@@ -1352,7 +1352,7 @@ static BOOL run_trans2test(int dummy)
/*
print out server properties
*/
-static BOOL run_properties(int dummy)
+static BOOL run_properties(void)
{
struct smbcli_state *cli;
BOOL correct = True;
@@ -1398,7 +1398,7 @@ static BOOL run_properties(int dummy)
/*
Test ntcreate calls made by xcopy
*/
-static BOOL run_xcopy(int dummy)
+static BOOL run_xcopy(void)
{
struct smbcli_state *cli1;
const char *fname = "\\test.txt";
@@ -1441,7 +1441,7 @@ static BOOL run_xcopy(int dummy)
/*
see how many RPC pipes we can open at once
*/
-static BOOL run_pipe_number(int dummy)
+static BOOL run_pipe_number(void)
{
struct smbcli_state *cli1;
const char *pipe_name = "\\WKSSVC";
@@ -1479,7 +1479,7 @@ static BOOL run_pipe_number(int dummy)
used for testing performance when there are N idle users
already connected
*/
- static BOOL torture_holdcon(int dummy)
+ static BOOL torture_holdcon(void)
{
int i;
struct smbcli_state **cli;
@@ -1529,7 +1529,7 @@ static BOOL run_pipe_number(int dummy)
Try with a wrong vuid and check error message.
*/
-static BOOL run_vuidtest(int dummy)
+static BOOL run_vuidtest(void)
{
struct smbcli_state *cli;
const char *fname = "\\vuid.tst";
@@ -1595,7 +1595,7 @@ static BOOL run_vuidtest(int dummy)
/*
Test open mode returns on read-only files.
*/
- static BOOL run_opentest(int dummy)
+ static BOOL run_opentest(void)
{
static struct smbcli_state *cli1;
static struct smbcli_state *cli2;
@@ -2085,7 +2085,7 @@ error_test80:
/*
sees what IOCTLs are supported
*/
-BOOL torture_ioctl_test(int dummy)
+BOOL torture_ioctl_test(void)
{
struct smbcli_state *cli;
uint16_t device, function;
@@ -2141,7 +2141,7 @@ BOOL torture_ioctl_test(int dummy)
/*
tries variants of chkpath
*/
-BOOL torture_chkpath_test(int dummy)
+BOOL torture_chkpath_test(void)
{
struct smbcli_state *cli;
int fnum;
@@ -2398,8 +2398,8 @@ double torture_create_procs(BOOL (*fn)(struct smbcli_state *, int), BOOL *result
static struct {
const char *name;
- BOOL (*fn)(int);
- uint_t flags;
+ BOOL (*fn)(void);
+ BOOL (*multi_fn)(struct smbcli_state *, int );
} torture_ops[] = {
/* base tests */
{"BASE-FDPASS", run_fdpasstest, 0},
@@ -2423,9 +2423,9 @@ static struct {
{"BASE-TCONDEV", run_tcon_devtype_test, 0},
{"BASE-VUID", run_vuidtest, 0},
{"BASE-RW1", run_readwritetest, 0},
- {"BASE-RW2", run_readwritemulti, FLAG_MULTIPROC},
+ {"BASE-RW2", NULL, run_readwritemulti},
{"BASE-OPEN", run_opentest, 0},
- {"BASE-DEFER_OPEN", run_deferopen, FLAG_MULTIPROC},
+ {"BASE-DEFER_OPEN", NULL, run_deferopen},
{"BASE-XCOPY", run_xcopy, 0},
{"BASE-RENAME", torture_test_rename, 0},
{"BASE-DELETE", torture_test_delete, 0},
@@ -2439,7 +2439,7 @@ static struct {
/* benchmarking tests */
{"BENCH-HOLDCON", torture_holdcon, 0},
{"BENCH-NBENCH", torture_nbench, 0},
- {"BENCH-TORTURE",run_torture, FLAG_MULTIPROC},
+ {"BENCH-TORTURE", NULL, run_torture},
/* RAW smb tests */
{"RAW-QFSINFO", torture_raw_qfsinfo, 0},
@@ -2469,7 +2469,7 @@ static struct {
{"SCAN-NTTRANS", torture_nttrans_scan, 0},
{"SCAN-ALIASES", torture_trans2_aliases, 0},
{"SCAN-SMB", torture_smb_scan, 0},
- {"SCAN-MAXFID", run_maxfidtest, FLAG_MULTIPROC},
+ {"SCAN-MAXFID", NULL, run_maxfidtest},
{"SCAN-UTABLE", torture_utable, 0},
{"SCAN-CASETABLE", torture_casetable, 0},
{"SCAN-PIPE_NUMBER", run_pipe_number, 0},
@@ -2537,9 +2537,10 @@ static BOOL run_test(const char *name)
matched = True;
init_iconv();
printf("Running %s\n", torture_ops[i].name);
- if (torture_ops[i].flags & FLAG_MULTIPROC) {
+ if (torture_ops[i].multi_fn) {
BOOL result;
- t = torture_create_procs(torture_ops[i].fn, &result);
+ t = torture_create_procs(torture_ops[i].multi_fn,
+ &result);
if (!result) {
ret = False;
printf("TEST %s FAILED!\n", torture_ops[i].name);
@@ -2547,7 +2548,7 @@ static BOOL run_test(const char *name)
} else {
start_timer();
- if (!torture_ops[i].fn(0)) {
+ if (!torture_ops[i].fn()) {
ret = False;
printf("TEST %s FAILED!\n", torture_ops[i].name);
}
@@ -2713,7 +2714,7 @@ static BOOL is_binding_string(const char *binding_string)
load_interfaces();
srandom(time(NULL));
- argv_new = (const char **)poptGetArgs(pc);
+ argv_new = discard_const_p(char *, poptGetArgs(pc));
argc_new = argc;
for (i=0; i<argc; i++) {