]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Tiny cleanups.
authorBruno Haible <bruno@clisp.org>
Sat, 5 Sep 2009 13:12:30 +0000 (15:12 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 5 Sep 2009 13:12:30 +0000 (15:12 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/write-po.c
gettext-tools/src/x-glade.c
gettext-tools/src/xgettext.c

index e0413172292542737576329e9cac548dae3eb56b..b7444a2241d5c15c1f5160c27c2408aba4f17a4d 100644 (file)
@@ -1,3 +1,10 @@
+2009-09-05  Bruno Haible  <bruno@clisp.org>
+
+       * write-po.c (wrap): Remove unused initialization.
+       * x-glade.c (comment_handler): Likewise.
+       * xgettext.c (flag_context_list_table_insert): Add comment.
+       Found by clang's static analyzer.
+
 2009-08-30  Bruno Haible  <bruno@clisp.org>
 
        Accommodate the Solaris iconv_open function, which cannot convert
index 6f14dce9fd9849c8d9d2e218e452093836f394db..cfbb09f840f6f9b6ef69453ff9194fa4d9fea6b6 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2008 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2009 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -638,7 +638,6 @@ wrap (const message_ty *mp, ostream_t stream,
            /* Locate the FMTDIR_* bits and transform the array to an array
               of attributes.  */
            fmtdirattr = XCALLOC (len, char);
-           fdap = fmtdirattr;
            fd_end = fmtdir + len;
            for (fdp = fmtdir, fdap = fmtdirattr; fdp < fd_end; fdp++, fdap++)
              if (*fdp & FMTDIR_START)
index e5a7a7766616afffacdfa411a161b326cc9c1d15..31191f2a8d6a1c304081abefcec3961ce948dfb6 100644 (file)
@@ -558,7 +558,7 @@ comment_handler (void *userData, const char *data)
   /* Split multiline comment into lines, and remove leading and trailing
      whitespace.  */
   char *copy = xstrdup (data);
-  char *p = copy;
+  char *p;
   char *q;
 
   for (p = copy; (q = strchr (p, '\n')) != NULL; p = q + 1)
index 1e7d800bf8d990157e7798e3a141c13eec8af6d9..6356013b6b52b09dae803ba237c80ec9a2a1025b 100644 (file)
@@ -1394,6 +1394,7 @@ flag_context_list_table_insert (flag_context_list_table_ty *table,
       {
        flag_context_list_ty *list = (flag_context_list_ty *)entry;
        flag_context_list_ty **lastp = NULL;
+       /* Invariant: list == (lastp != NULL ? *lastp : entry).  */
 
        while (list != NULL && list->argnum < argnum)
          {