In test.c, this patch changes the type of program_argstring to char * from a const char *. This is because, we use a char * string in the rest of the program and declare an extern accordingly. Removing the const type helps in keeping the code cleaner at no extra cost. --- src/ChangeLog | 6 ++++++ src/test.c | 2 +- src/warc.c | 4 ---- src/wget.h | 1 + 4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog index b5de3e1..4a2b1b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2014-11-22 Darshit Shah <[email protected]> + * wget.h: Make extern declaration for program_argstring. + * warc.c: Remove extern declaration + * test.c: Make program_argstring a char *, instead of const char *. + +2014-11-22 Darshit Shah <[email protected]> + * wget.h: Make extern declaration for program_name 2014-11-22 Darshit Shah <[email protected]> diff --git a/src/test.c b/src/test.c index 367bc07..e19673e 100644 --- a/src/test.c +++ b/src/test.c @@ -51,7 +51,7 @@ const char *test_append_uri_pathel(void); const char *test_are_urls_equal(void); const char *test_is_robots_txt_url(void); -const char *program_argstring = "TEST"; +char *program_argstring = "TEST"; int tests_run; diff --git a/src/warc.c b/src/warc.c index d61093c..2d4d383 100644 --- a/src/warc.c +++ b/src/warc.c @@ -68,10 +68,6 @@ as that of the covered work. */ #endif -/* Set by main in main.c */ -extern char *program_argstring; - - /* The log file (a temporary file that contains a copy of the wget log). */ static FILE *warc_log_fp; diff --git a/src/wget.h b/src/wget.h index 94f6ccb..2b86557 100644 --- a/src/wget.h +++ b/src/wget.h @@ -314,6 +314,7 @@ typedef double SUM_SIZE_INT; extern const char *exec_name; extern char *program_name; +extern char *program_argstring; /* Document type ("dt") flags */ enum -- 2.1.3
