diff options
author | Daiki Ueno <ueno@gnu.org> | 2016-05-16 17:35:13 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-05-16 17:37:32 +0900 |
commit | cd95c539516127b153ab21b57a1ceaa0e731ec4c (patch) | |
tree | 56d3bb6cd62e7c1d25159675194a353cfb5b715d | |
parent | 0571be87e09c6db11be8c56c773b563c2b4c99a4 (diff) | |
download | external_gettext-cd95c539516127b153ab21b57a1ceaa0e731ec4c.zip external_gettext-cd95c539516127b153ab21b57a1ceaa0e731ec4c.tar.gz external_gettext-cd95c539516127b153ab21b57a1ceaa0e731ec4c.tar.bz2 |
javascript: Avoid uninitialized variable
* gettext-tools/src/format-javascript.c (format_check): Fix
loop initialization. Spotted by clang-analyzer.
-rw-r--r-- | gettext-tools/src/format-javascript.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gettext-tools/src/format-javascript.c b/gettext-tools/src/format-javascript.c index 44814de..c9c3d32 100644 --- a/gettext-tools/src/format-javascript.c +++ b/gettext-tools/src/format-javascript.c @@ -343,7 +343,7 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality, /* Check the argument names are the same. Both arrays are sorted. We search for the first difference. */ - for (i = 0; i < spec2->numbered_arg_count; i++) + for (i = 0, j = 0; i < n1 || j < n2; ) { int cmp = (i >= n1 ? 1 : j >= n2 ? -1 : |