From: Bruno Haible Date: Sat, 5 Sep 2009 13:12:30 +0000 (+0200) Subject: Tiny cleanups. X-Git-Tag: v0.18~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57428135bf93fae308e2a5aedde121f0efede64f;p=thirdparty%2Fgettext.git Tiny cleanups. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index e04131722..b7444a224 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,10 @@ +2009-09-05 Bruno Haible + + * 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 Accommodate the Solaris iconv_open function, which cannot convert diff --git a/gettext-tools/src/write-po.c b/gettext-tools/src/write-po.c index 6f14dce9f..cfbb09f84 100644 --- a/gettext-tools/src/write-po.c +++ b/gettext-tools/src/write-po.c @@ -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 @@ -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) diff --git a/gettext-tools/src/x-glade.c b/gettext-tools/src/x-glade.c index e5a7a7766..31191f2a8 100644 --- a/gettext-tools/src/x-glade.c +++ b/gettext-tools/src/x-glade.c @@ -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) diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 1e7d800bf..6356013b6 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -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) {