From 1afb0ad372a1692fc5f886dd8059a9d4ef667e71 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Oct 2014 18:34:29 +0300 Subject: Avoid compilation warnings. * main.c (find_and_set_default_shell, main) [WINDOWS32]: Declare variables 'const char *' to avoid compiler warnings. * job.c (construct_command_argv_internal) [!NDEBUG]: Declare 'end' and set it only if NDEBUG is not defined, to avoid compiler warnings. --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 0d43575..7f14cba 100644 --- a/main.c +++ b/main.c @@ -890,7 +890,7 @@ find_and_set_default_shell (const char *token) int sh_found = 0; char *atoken = 0; const char *search_token; - char *tokend; + const char *tokend; PATH_VAR(sh_path); extern const char *default_shell; @@ -1032,8 +1032,8 @@ main (int argc, char **argv, char **envp) unsigned int restarts = 0; unsigned int syncing = 0; #ifdef WINDOWS32 - char *unix_path = NULL; - char *windows32_path = NULL; + const char *unix_path = NULL; + const char *windows32_path = NULL; SetUnhandledExceptionFilter (handle_runtime_exceptions); -- cgit v1.2.3