]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
sentence: Avoid compiler warnings
authorDaiki Ueno <ueno@gnu.org>
Tue, 6 Oct 2015 00:59:32 +0000 (09:59 +0900)
committerDaiki Ueno <ueno@gnu.org>
Tue, 6 Oct 2015 01:00:09 +0000 (10:00 +0900)
* 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.

gettext-tools/src/ChangeLog
gettext-tools/src/sentence.c

index 30a58aed8a60a43d760007e8ef370cf5dcf9a682..a29357ec84b75763cb3661de1403753d8bce8599 100644 (file)
@@ -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.
index 30ae2235c294b02900a640effe78a74c21a9a1bc..0a4883eea9de05c02193224f4b0ab3fd3c70628c 100644 (file)
@@ -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)
     {