From: Bruno Haible Date: Mon, 10 Aug 2009 08:11:56 +0000 (+0200) Subject: Avoid a gcc warning. X-Git-Tag: v0.18~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76c415ff0ccbc4760353a9053c443809bc96e6c0;p=thirdparty%2Fgettext.git Avoid a gcc warning. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index c5ba9fcd3..b84f43d25 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2009-08-10 Bruno Haible + + Avoid a gcc warning. + * msgfilter.c (sub_argv): Change type to 'const char **'. + (main): Update. + 2009-08-10 Bruno Haible Use type 'ucs4_t' more often. Avoids gcc warnings on Cygwin. diff --git a/gettext-tools/src/msgfilter.c b/gettext-tools/src/msgfilter.c index 88662ba0e..3fe7525e2 100644 --- a/gettext-tools/src/msgfilter.c +++ b/gettext-tools/src/msgfilter.c @@ -77,7 +77,7 @@ static const char *sub_name; static const char *sub_path; /* Argument list for the subprogram. */ -static char **sub_argv; +static const char **sub_argv; static int sub_argc; /* Filter function. */ @@ -288,7 +288,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ /* Build argument list for the program. */ sub_argc = argc - optind; - sub_argv = XNMALLOC (sub_argc + 1, char *); + sub_argv = XNMALLOC (sub_argc + 1, const char *); for (i = 0; i < sub_argc; i++) sub_argv[i] = argv[optind + i]; sub_argv[i] = NULL; @@ -345,7 +345,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ sub_path = find_in_path (sub_name); /* Finish argument list for the program. */ - sub_argv[0] = (char *) sub_path; + sub_argv[0] = sub_path; } /* Apply the subprogram. */