Commit 71768862 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Change main's second argument to {{{char *const*argv}}}. Fixes #2228. close[t:2228]

git-svn-id: file:///svn/toku/tokudb@18184 c7de825b-a66e-492c-adef-691d508d4ae1
parent 031acf5b
......@@ -13,7 +13,7 @@ DB_ENV *env;
DB *db;
DB_TXN *txn=0;
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
int r;
int i;
r = system("rm -rf ./" DIR);
......
......@@ -334,7 +334,7 @@ static void print_struct (const char *structname, enum need_internal_type need_i
assert(did_toku_internal || !need_internal);
}
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__((__unused__))) {
printf("#ifndef _DB_H\n");
printf("#define _DB_H\n");
printf("/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */\n");
......
......@@ -201,7 +201,7 @@ void sample_dbt_offsets (void) {
sort_and_dump_fields("dbt", sizeof(DBT));
}
int main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
int main (int argc __attribute__((__unused__)), char *const argv[] __attribute__((__unused__))) {
open_file();
fprintf(outf, "/* BDB offsets on a %d-bit machine */\n", __WORDSIZE);
fprintf(outf, "#define DB_VERSION_MAJOR_%d %d\n", __WORDSIZE, DB_VERSION_MAJOR);
......
......@@ -536,7 +536,7 @@ test1514(void) {
}
#endif
int main (int argc, const char *argv[]) {
int main (int argc, const char *const argv[]) {
struct timeval t1,t2,t3;
long long total_n_items = default_n_items;
char *endptr;
......
......@@ -22,7 +22,7 @@ static u_int32_t cachesize = 16*1024*1024;
const char *dbdir = "./bench." STRINGIFY(DIRSUF); /* DIRSUF is passed in as a -D argument to the compiler. */
static void parse_args (int argc, const char *argv[]) {
static void parse_args (int argc, const char *const argv[]) {
pname=argv[0];
argc--;
argv++;
......@@ -132,7 +132,7 @@ static void scanrace_lwc (void) {
printf("LWC Scan %lld bytes (%d rows) in %9.6fs at %9fMB/s\n", e.totalbytes, e.rowcounter, tdiff, 1e-6*e.totalbytes/tdiff);
}
int main (int argc, const char *argv[]) {
int main (int argc, const char *const argv[]) {
parse_args(argc,argv);
......
......@@ -69,7 +69,7 @@ static double gettime (void) {
return tv.tv_sec + 1e-6*tv.tv_usec;
}
static void parse_args (int argc, const char *argv[]) {
static void parse_args (int argc, const char *const argv[]) {
pname=argv[0];
argc--; argv++;
int specified_run_mode=0;
......@@ -536,7 +536,7 @@ static void scanscan_verify (void) {
#endif
int main (int argc, const char *argv[]) {
int main (int argc, const char *const argv[]) {
parse_args(argc,argv);
......
......@@ -9,7 +9,7 @@
#endif
#include "toku_os.h"
int main(int argc, char *argv[]) {
int main(int argc, char *const argv[]) {
int verbose = 0;
int i;
for (i=1; i<argc; i++) {
......
......@@ -3,7 +3,7 @@
#include <test.h>
#include <toku_assert.h>
int test_main(int argc, char *argv[]) {
int test_main(int argc, char *const argv[]) {
char fname[] = "pwrite4g.data";
int r;
unlink(fname);
......
#include <toku_portability.h>
int test_main(int argc, char *argv[]);
int test_main(int argc, char *const argv[]);
int
main(int argc, char *argv[]) {
main(int argc, char *const argv[]) {
toku_portability_init();
int r = test_main(argc, argv);
toku_portability_destroy();
......
......@@ -5,7 +5,7 @@
#include <string.h>
#include "toku_os.h"
int main(int argc, char *argv[]) {
int main(int argc, char *const argv[]) {
int verbose = 0;
int i;
for (i=1; i<argc; i++) {
......
......@@ -14,7 +14,7 @@ long long parsell (char *s) {
return r;
}
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
long long i;
assert(argc==4);
long long count=parsell(argv[1]);
......
......@@ -14,7 +14,7 @@ long long parsell (char *s) {
return r;
}
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
long long i;
assert(argc==3);
long long lo=parsell(argv[1]);
......
......@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
int i;
for (i=0; i<1000; i++) {
printf("%d\t%d\n", random(), random());
......
......@@ -281,7 +281,7 @@ getuint64(const char *f) {
}
int
main (int argc, const char *argv[]) {
main (int argc, const char *const argv[]) {
const char *arg0 = argv[0];
int interactive = 0;
argc--; argv++;
......
......@@ -5,7 +5,7 @@
// Clip horizontally (100 chars by default)
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
int targcol=100;
int c;
int col=0;
......
......@@ -626,7 +626,7 @@ generate_log_entry_functions(void) {
const char codefile[] = "log_code.c";
const char printfile[] = "log_print.c";
const char headerfile[] = "log_header.h";
int main (int argc, const char *argv[]) {
int main (int argc, const char *const argv[]) {
assert(argc==2); // the single argument is the directory into which to put things
const char *dir = argv[1];
size_t codepathlen = sizeof(codefile) + strlen(dir) + 4;
......
......@@ -112,7 +112,7 @@ static void test1 (void) {
}
}
int main (int argc, char *argv[] __attribute__((__unused__))) {
int main (int argc, char *const argv[] __attribute__((__unused__))) {
assert(argc==1);
test0();
test1();
......
......@@ -11,20 +11,20 @@
#include "includes.h"
static int recovery_main(int argc, const char *argv[]);
static int recovery_main(int argc, const char *const argv[]);
static void dummy(void) {}
static void dummy_set_brt(DB *db UU(), BRT brt UU()) {}
int
main(int argc, const char *argv[]) {
main(int argc, const char *const argv[]) {
toku_brt_init(dummy, dummy, dummy_set_brt);
int r = recovery_main(argc, argv);
toku_brt_destroy();
return r;
}
int recovery_main (int argc, const char *argv[]) {
int recovery_main (int argc, const char *const argv[]) {
const char *data_dir, *log_dir;
if (argc==3) {
data_dir = argv[1];
......
......@@ -136,7 +136,7 @@ static void newmain (int count) {
}
}
int main (int argc, char *argv[]) {
int main (int argc, char *const argv[]) {
int count=-1;
while (argc>1) {
if (strcmp(argv[1], "--oldcode")==0) {
......
......@@ -108,7 +108,7 @@ test_shutdown (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
setup();
test_abort_abort();
......
......@@ -107,7 +107,7 @@ test_shutdown (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
setup();
test_abort_commit();
......
......@@ -103,7 +103,7 @@ test_shutdown (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
setup();
test_commit_abort();
......
......@@ -103,7 +103,7 @@ test_shutdown (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
setup();
test_commit_commit();
......
......@@ -89,7 +89,7 @@ do_1381 (void) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
parse_args(argc, argv);
do_1381();
......
......@@ -66,7 +66,7 @@ do_627 (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
do_627();
return 0;
......
......@@ -48,7 +48,7 @@ checkpoint1 (void)
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
parse_args(argc, argv);
checkpoint1();
......
......@@ -154,7 +154,7 @@ static void checkpoint_callback_2(void * extra) {
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
u_int32_t n;
int snap;
......
......@@ -67,7 +67,7 @@ checkpoint_test_1(u_int32_t flags, u_int32_t n, int snap_all) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
db_env_set_checkpoint_callback(checkpoint_callback_1, &string_1);
......
......@@ -277,7 +277,7 @@ usage(char *progname) {
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
// get arguments, set parameters
......@@ -285,7 +285,7 @@ test_main (int argc, char *argv[]) {
int c;
int crash = 0;
while ((c = getopt(argc, argv, "cChi:qvn:l:")) != -1) {
while ((c = getopt(argc, (char * const *)argv, "cChi:qvn:l:")) != -1) {
switch(c) {
case 'c':
crash = 1;
......
......@@ -92,7 +92,7 @@ static void checkpoint_callback_1(void * extra) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
int limit = 4;
parse_args(argc, argv);
......
......@@ -58,7 +58,7 @@ static void run_test (void) {
const char *cmd;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -83,7 +83,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
run_test();
return 0;
......
......@@ -97,7 +97,7 @@ doit (BOOL committed_provdels) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
setup();
......
......@@ -61,7 +61,7 @@ doit (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
test_setup();
......
......@@ -198,7 +198,7 @@ do_writes_that_fail (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
do_writes_that_fail();
return 0;
......
......@@ -263,7 +263,7 @@ static void run_test (void) {
CKERR(r);
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
uint32_t which;
for (which = 0; which < MAX_DBS; which++) {
......
......@@ -157,7 +157,7 @@ test_env_startup(int logging) {
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
test_env_startup(0); // transactionless env
test_env_startup(1); // with transactions and logging
......
......@@ -224,7 +224,7 @@ test_filesize (void)
}
}
int test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
int test_main (int argc __attribute__((__unused__)), char * const argv[] __attribute__((__unused__))) {
parse_args(argc, argv);
setup();
if (verbose) print_engine_status(env);
......
......@@ -16,7 +16,7 @@ static void *startb(void* ignore __attribute__((__unused__))) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
pthread_t a,b;
{ int x_l = pthread_create(&a, NULL, starta, NULL); assert(x_l==0); }
......
......@@ -85,7 +85,7 @@ static void *startb(void* ignore __attribute__((__unused__))) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
pthread_t a,b;
initialize();
......
......@@ -85,7 +85,7 @@ static void *startb(void* ignore __attribute__((__unused__))) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
pthread_t a,b;
initialize();
......
......@@ -126,7 +126,7 @@ doit (void)
reopen_em(); // now a node is 9143 bytes
}
int test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
int test_main (int argc __attribute__((__unused__)), char * const argv[] __attribute__((__unused__))) {
setup();
doit();
close_em();
......
......@@ -116,7 +116,7 @@ doit (void)
return;
}
int test_main (int argc __attribute__((__unused__)), char *argv[] __attribute__((__unused__))) {
int test_main (int argc __attribute__((__unused__)), char * const argv[] __attribute__((__unused__))) {
setup();
doit();
close_em();
......
......@@ -5,7 +5,7 @@
const int envflags = DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_PRIVATE;
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
int r;
system("rm -rf " ENVDIR);
......
......@@ -67,7 +67,7 @@ static void test (void) {
}
int
test_main (int argc , char *argv[]) {
test_main (int argc , char * const argv[]) {
parse_args(argc, argv);
test();
return 0;
......
......@@ -90,7 +90,7 @@ static void test (void) {
}
int
test_main (int argc , char *argv[]) {
test_main (int argc , char * const argv[]) {
parse_args(argc, argv);
test();
return 0;
......
......@@ -76,7 +76,7 @@ static void test (void) {
}
int
test_main (int argc , char *argv[]) {
test_main (int argc , char * const argv[]) {
parse_args(argc, argv);
test();
return 0;
......
......@@ -79,7 +79,7 @@ static void test (void) {
}
int
test_main (int argc , char *argv[]) {
test_main (int argc , char * const argv[]) {
parse_args(argc, argv);
test();
return 0;
......
......@@ -141,15 +141,15 @@ static void run_test(void)
}
// ------------ infrastructure ----------
static void do_args(int argc, char *argv[]);
static void do_args(int argc, char * const argv[]);
int test_main(int argc, char **argv) {
int test_main(int argc, char * const *argv) {
do_args(argc, argv);
run_test();
return 0;
}
static void do_args(int argc, char *argv[]) {
static void do_args(int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......
......@@ -280,15 +280,15 @@ static void run_test(void)
}
// ------------ infrastructure ----------
static void do_args(int argc, char *argv[]);
static void do_args(int argc, char * const argv[]);
int test_main(int argc, char **argv) {
int test_main(int argc, char * const *argv) {
do_args(argc, argv);
run_test();
return 0;
}
static void do_args(int argc, char *argv[]) {
static void do_args(int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......
......@@ -74,7 +74,7 @@ doit (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
test_setup();
......
......@@ -112,7 +112,7 @@ test_shutdown (void) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
parse_args(argc, argv);
test_setup();
test_commit_commit();
......
......@@ -129,7 +129,7 @@ static void do_check (long N) {
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
assert(argc>=2 && argc<=3);
if (strcmp(argv[1], "--write")==0) {
assert(argc==2);
......
......@@ -365,7 +365,7 @@ progress_test_2(void) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
parse_args(argc, argv);
int commit;
......
......@@ -82,7 +82,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -115,7 +115,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char *const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -133,7 +133,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -187,7 +187,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_commit) {
run_test(TRUE, FALSE);
......
......@@ -133,7 +133,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -187,7 +187,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_commit) {
run_test(TRUE, FALSE);
......
......@@ -135,7 +135,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -189,7 +189,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_commit) {
run_test(TRUE, FALSE);
......
......@@ -135,7 +135,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -189,7 +189,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_commit) {
run_test(TRUE, FALSE);
......
......@@ -210,7 +210,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -265,7 +265,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -189,7 +189,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -244,7 +244,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -48,7 +48,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -81,7 +81,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -126,7 +126,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -181,7 +181,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -126,7 +126,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -181,7 +181,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -80,7 +80,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -113,7 +113,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -78,7 +78,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -111,7 +111,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -71,7 +71,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -104,7 +104,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -61,7 +61,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -94,7 +94,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -73,7 +73,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -106,7 +106,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -57,7 +57,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -90,7 +90,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -67,7 +67,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -100,7 +100,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char *const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -67,7 +67,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -100,7 +100,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -103,7 +103,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -136,7 +136,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -184,7 +184,7 @@ static void run_recover (void) {
const char *cmd;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -213,7 +213,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -102,7 +102,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -135,7 +135,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -95,7 +95,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -128,7 +128,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -85,7 +85,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -118,7 +118,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -94,7 +94,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -127,7 +127,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -161,7 +161,7 @@ static void run_recover (void) {
const char *cmd;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -190,7 +190,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -184,7 +184,7 @@ static void run_recover (void) {
const char *cmd;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -213,7 +213,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -87,7 +87,7 @@ const char *cmd;
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -141,7 +141,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_commit) {
run_test(TRUE, FALSE);
......
......@@ -86,7 +86,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -119,7 +119,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -89,7 +89,7 @@ const char *cmd;
BOOL do_test=FALSE, do_recover=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void test_parse_args (int argc, char *argv[]) {
static void test_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -122,7 +122,7 @@ static void test_parse_args (int argc, char *argv[]) {
}
}
int test_main (int argc, char *argv[]) {
int test_main (int argc, char * const argv[]) {
test_parse_args(argc, argv);
if (do_test) {
run_test();
......
......@@ -116,7 +116,7 @@ do_x1_no_recover (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......@@ -171,7 +171,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -64,7 +64,7 @@ do_x1_recover (BOOL UU(did_commit)) {
BOOL do_commit=FALSE, do_recover_committed=FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......@@ -104,7 +104,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -74,7 +74,7 @@ do_x1_recover (BOOL UU(did_commit)) {
BOOL do_commit=FALSE, do_recover_committed=FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......@@ -114,7 +114,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
srandom(0xDEADBEEF);
for (i=0; i<N; i++) {
......
......@@ -82,7 +82,7 @@ do_x1_recover (BOOL UU(did_commit)) {
BOOL do_commit=FALSE, do_recover_committed=FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......@@ -122,7 +122,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
srandom(0xDEADBEEF);
for (i=0; i<N; i++) {
......
......@@ -179,7 +179,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -234,7 +234,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char *const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -182,7 +182,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE, do_no_recover = FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -237,7 +237,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[])
test_main (int argc, char * const argv[])
{
x1_parse_args(argc, argv);
if (do_commit) {
......
......@@ -171,7 +171,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -223,7 +223,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
x1_parse_args(argc, argv);
if (do_commit) {
do_x1_shutdown (TRUE, FALSE);
......
......@@ -172,7 +172,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_explicit_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE, do_recover_only=FALSE;
static void
x1_parse_args (int argc, char *argv[]) {
x1_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -224,7 +224,7 @@ x1_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
x1_parse_args(argc, argv);
if (do_commit) {
do_x1_shutdown (TRUE, FALSE);
......
......@@ -160,7 +160,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE;
static void
x2_parse_args (int argc, char *argv[]) {
x2_parse_args (int argc, char *const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -206,7 +206,7 @@ x2_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
x2_parse_args(argc, argv);
if (do_commit) {
do_x2_shutdown (TRUE);
......
......@@ -160,7 +160,7 @@ do_test (void) {
BOOL do_commit=FALSE, do_abort=FALSE, do_recover_committed=FALSE, do_recover_aborted=FALSE;
static void
x2_parse_args (int argc, char *argv[]) {
x2_parse_args (int argc, char * const argv[]) {
int resultcode;
cmd = argv[0];
argc--; argv++;
......@@ -206,7 +206,7 @@ x2_parse_args (int argc, char *argv[]) {
}
int
test_main (int argc, char *argv[]) {
test_main (int argc, char * const argv[]) {
x2_parse_args(argc, argv);
if (do_commit) {
do_x2_shutdown (TRUE);
......
......@@ -404,17 +404,17 @@ static void run_test(int iter){
}
// ------------ infrastructure ----------
static void do_args(int argc, char *argv[]);
static void do_args(int argc, char * const argv[]);
static int iter_arg = 0;
int test_main(int argc, char **argv) {
int test_main(int argc, char *const*argv) {
do_args(argc, argv);
run_test(iter_arg);
return 0;
}
static void do_args(int argc, char *argv[]) {
static void do_args(int argc, char * const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......
......@@ -114,7 +114,7 @@ get_choice_lock_table_split_fcreate(void) {
}
static void
do_args(int argc, char *argv[]) {
do_args(int argc, char * const argv[]) {
cmd = argv[0];
int i;
//Clear
......@@ -588,7 +588,7 @@ recover_and_verify(void) {
}
int
test_main(int argc, char *argv[]) {
test_main(int argc, char * const argv[]) {
crash_during_checkpoint = 0; //Do not crash during checkpoint (possibly during recovery).
do_args(argc, argv);
env_startup();
......
......@@ -510,17 +510,17 @@ static void run_test (int iter) {
// ------------ infrastructure ----------
static void do_args(int argc, char *argv[]);
static void do_args(int argc, char *const argv[]);
static int iter_arg = 0;
int test_main(int argc, char **argv) {
int test_main(int argc, char *const*argv) {
do_args(argc, argv);
run_test(iter_arg);
return 0;
}
static void do_args(int argc, char *argv[]) {
static void do_args(int argc, char *const argv[]) {
int resultcode;
char *cmd = argv[0];
argc--; argv++;
......
......@@ -270,7 +270,7 @@ redirect_test(uint8_t num_open_before, uint8_t num_open_after, uint8_t num_close
int
test_main (int argc, char *argv[])
test_main (int argc, char *const argv[])
{
parse_args(argc, argv);
redirect_EINVAL();
......
......@@ -107,7 +107,7 @@ static void root_fifo_1(int n, int create_outside) {
r = env->close(env, 0); assert(r == 0); env = null_env;
}
int test_main(int argc, char *argv[]) {
int test_main(int argc, char *const argv[]) {
int i;
int n = -1;
......
......@@ -101,7 +101,7 @@ static void root_fifo_2(int n, int create_outside) {
#endif
}
int test_main(int argc, char *argv[]) {
int test_main(int argc, char *const argv[]) {
int i;
int n = -1;
......
......@@ -123,7 +123,7 @@ static void root_fifo_31(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env;
}
int test_main(int argc, char *argv[]) {
int test_main(int argc, char *const argv[]) {
int i;
int n = -1;
......
......@@ -123,7 +123,7 @@ static void root_fifo_32(int n) {
r = env->close(env, 0); assert(r == 0); env = null_env;
}
int test_main(int argc, char *argv[]) {
int test_main(int argc, char *const argv[]) {
int i;
int n = -1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment