Fixes a build warning in fnmatch_loop.c.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
gnulib/fnmatch_loop.c: In function ‘ext_match’:
gnulib/fnmatch_loop.c:1086: warning: signed and unsigned type in conditional expression
gnulib/fnmatch_loop.c:1094: warning: signed and unsigned type in conditional expression

2009-11-09  Robert Millan  <rmh....@aybabtu.com>

	* lib/fnmatch_loop.c (EXT): Fix warning (signed and unsigned type in
	conditional expression).

=== modified file 'lib/fnmatch_loop.c'
--- lib/fnmatch_loop.c	2007-01-24 07:15:57 +0000
+++ lib/fnmatch_loop.c	2009-11-09 19:04:58 +0000
@@ -1069,9 +1069,10 @@
 	    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			      \

Reply via email to