From: Daiki Ueno Date: Tue, 6 Oct 2015 00:59:32 +0000 (+0900) Subject: sentence: Avoid compiler warnings X-Git-Tag: v0.19.7~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=423d5cca70c2640eaf45dabdc36ed755701043a8;p=thirdparty%2Fgettext.git sentence: Avoid compiler warnings * gettext-tools/src/sentence.c (sentence_end): Assign initial values to local variables to suppress compiler warnings with -Wmaybe-uninitialized. This shouldn't address any real bug. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 30a58aed8..a29357ec8 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2015-10-06 Daiki Ueno + + * sentence.c (sentence_end): Assign initial values to local + variables to suppress compiler warnings with + -Wmaybe-uninitialized. This shouldn't address any real bug. + 2015-09-11 Daiki Ueno * gettext 0.19.6 released. diff --git a/gettext-tools/src/sentence.c b/gettext-tools/src/sentence.c index 30ae2235c..0a4883eea 100644 --- a/gettext-tools/src/sentence.c +++ b/gettext-tools/src/sentence.c @@ -54,9 +54,9 @@ sentence_end (const char *string, ucs4_t *ending_charp) ucs4_t ending_char = 0xfffd; /* Possible starting position of the match, and the next starting position if the current match fails. */ - const char *match_start, *match_next; + const char *match_start = NULL, *match_next = NULL; /* Number of spaces. */ - int spaces; + int spaces = 0; while (str <= str_limit) {