1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r3324: made the smbtorture code completely warning free

This commit is contained in:
Andrew Tridgell 2004-10-28 13:40:50 +00:00 committed by Gerald (Jerry) Carter
parent 5921587ec2
commit 7067bb9b52
64 changed files with 127 additions and 119 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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";

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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";

View File

@ -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;

View File

@ -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";

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -22,7 +22,7 @@
#include "includes.h"
BOOL torture_local_idtree(int dummy)
BOOL torture_local_idtree(void)
{
struct idr_context *idr;
int i;

View File

@ -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;

View File

@ -679,7 +679,7 @@ static BOOL test_speed(void)
}
BOOL torture_local_talloc(int dummy)
BOOL torture_local_talloc(void)
{
BOOL ret = True;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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");

View File

@ -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;

View File

@ -21,7 +21,7 @@
#include "includes.h"
BOOL torture_rpc_dcom(int dummy)
BOOL torture_rpc_dcom(void)
{
NTSTATUS status;
struct dcerpc_pipe *p;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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++) {