From: Paul Eggert Date: Mon, 21 Mar 2011 16:41:03 +0000 (-0700) Subject: * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~513^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58cb46fbf4a0d3b37cb9cf2b07446eaa48663693;p=emacs.git * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index cb847669deb..6c25f582eea 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-21 Paul Eggert + * etags.c (Ada_funcs): Redo slightly to avoid overflow warning. + etags: In Prolog functions, don't assume int fits in size_t. This avoids a warning with gcc -Wstrict-overflow. * etags.c (Prolog_functions, prolog_pr, prolog_atom): Use size_t, diff --git a/lib-src/etags.c b/lib-src/etags.c index 0c14a0d1663..6cb321fe75e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4198,7 +4198,7 @@ Ada_funcs (FILE *inf) /* Skip a string i.e. "abcd". */ if (inquote || (*dbp == '"')) { - dbp = etags_strchr ((inquote) ? dbp : dbp+1, '"'); + dbp = etags_strchr (dbp + !inquote, '"'); if (dbp != NULL) { inquote = FALSE;