From: Robert Millan Date: Mon, 9 Nov 2009 19:20:33 +0000 (+0000) Subject: 2009-11-09 Robert Millan X-Git-Tag: 1.98~433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84b860d82795ef38665a25d57d3086c31881b7e8;p=thirdparty%2Fgrub.git 2009-11-09 Robert Millan * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in conditional expression). --- diff --git a/ChangeLog b/ChangeLog index fa0493190..2d7a088ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-09 Robert Millan + + * gnulib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in + conditional expression). + 2009-11-09 Robert Millan Import from Gnulib. diff --git a/gnulib/fnmatch_loop.c b/gnulib/fnmatch_loop.c index d1008c247..c2182ffb0 100644 --- a/gnulib/fnmatch_loop.c +++ b/gnulib/fnmatch_loop.c @@ -1069,9 +1069,10 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, size_t plensize; \ size_t newpsize; \ \ + assert (p > startp); \ plen = (opt == L_('?') || opt == L_('@') \ ? pattern_len \ - : p - startp + 1); \ + : (unsigned) (p - startp) + 1); \ plensize = plen * sizeof (CHAR); \ newpsize = offsetof (struct patternlist, str) + plensize; \ if ((size_t) -1 / sizeof (CHAR) < plen \