diff options
author | Daiki Ueno <ueno@gnu.org> | 2015-10-06 09:59:32 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2015-10-06 10:00:09 +0900 |
commit | 423d5cca70c2640eaf45dabdc36ed755701043a8 (patch) | |
tree | bd7c64fe2da493792f90bb208c9ef912102fe5b3 | |
parent | 20eb508d5a5afd9719b5f87febf98c7c6d0a1187 (diff) | |
download | gettext-423d5cca70c2640eaf45dabdc36ed755701043a8.tar.gz |
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.
-rw-r--r-- | gettext-tools/src/ChangeLog | 6 | ||||
-rw-r--r-- | gettext-tools/src/sentence.c | 4 |
2 files changed, 8 insertions, 2 deletions
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 <ueno@gnu.org> + + * 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 <ueno@gnu.org> * 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) { |