From: Bruno Haible Date: Tue, 24 Jul 2001 12:52:24 +0000 (+0000) Subject: Silence a gcc warning. X-Git-Tag: v0.10.39~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7ffdd7b155fd1b0b99b7240c566a3354fe094a9;p=thirdparty%2Fgettext.git Silence a gcc warning. --- diff --git a/intl/ChangeLog b/intl/ChangeLog index de85bb408..0a72247b2 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,9 @@ +2001-04-30 Bruno Haible + + Silence "gcc -Wall -Wwrite-strings" warnings. + * localcharset.c (charset_aliases): Change type to 'const char *'. + (get_charset_aliases): Change type of 'cp' to 'const char *'. + 2001-05-23 Bruno Haible * gettext-0.10.38 released. diff --git a/intl/localcharset.c b/intl/localcharset.c index 22e09e410..61f8f3e85 100644 --- a/intl/localcharset.c +++ b/intl/localcharset.c @@ -75,13 +75,13 @@ /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ -static char * volatile charset_aliases; +static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases () { - char *cp; + const char *cp; cp = charset_aliases; if (cp == NULL) diff --git a/lib/ChangeLog b/lib/ChangeLog index def8550aa..025ab30a5 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2001-04-30 Bruno Haible + + Silence "gcc -Wall -Wwrite-strings" warnings. + * localcharset.c (charset_aliases): Change type to 'const char *'. + (get_charset_aliases): Change type of 'cp' to 'const char *'. + 2001-05-23 Bruno Haible * gettext-0.10.38 released. diff --git a/lib/localcharset.c b/lib/localcharset.c index 22e09e410..61f8f3e85 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -75,13 +75,13 @@ /* Pointer to the contents of the charset.alias file, if it has already been read, else NULL. Its format is: ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ -static char * volatile charset_aliases; +static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * get_charset_aliases () { - char *cp; + const char *cp; cp = charset_aliases; if (cp == NULL)