about summary refs log tree commit diff
path: root/posix/fnmatch_loop.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-03-16 03:22:41 +0000
committerRoland McGrath <roland@gnu.org>2003-03-16 03:22:41 +0000
commiteb64f8cbe3fd1b8e10b1269fa345ea2a0caa976c (patch)
tree7661571a7ea2348d5be1e7aaceb087091fe3903a /posix/fnmatch_loop.c
parent385cce415c0060f315b1cbd9260416f54e5853cf (diff)
downloadglibc-eb64f8cbe3fd1b8e10b1269fa345ea2a0caa976c.tar.gz
glibc-eb64f8cbe3fd1b8e10b1269fa345ea2a0caa976c.tar.xz
glibc-eb64f8cbe3fd1b8e10b1269fa345ea2a0caa976c.zip
* posix/fnmatch_loop.c: Add casts for signedness.
	* nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise.
	* gmon/gmon.c (write_call_graph): Use u_long for FROM_LEN.
	* nscd/nscd_getgr_r.c (nscd_getgr_r): Use nscd_ssize_t for CNT.
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r--posix/fnmatch_loop.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index 8bdd9a6063..8c0b06b30e 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1993, 1996-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2003
+	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -539,11 +540,13 @@ FCT (pattern, string, string_end, no_leading_period, flags)
 				if (! is_range)
 				  {
 # ifdef WIDE_CHAR_VERSION
-				    for (c1 = 0; c1 < wextra[idx]; ++c1)
+				    for (c1 = 0;
+					 (int32_t) c1 < wextra[idx];
+					 ++c1)
 				      if (n[c1] != wextra[1 + c1])
 					break;
 
-				    if (c1 == wextra[idx])
+				    if ((int32_t) c1 == wextra[idx])
 				      goto matched;
 # else
 				    for (c1 = 0; c1 < extra[idx]; ++c1)
@@ -932,7 +935,7 @@ FCT (pattern, string, string_end, no_leading_period, flags)
 	case L('/'):
 	  if (NO_LEADING_PERIOD (flags))
 	    {
-	      if (n == string_end || c != *n)
+	      if (n == string_end || c != (UCHAR) *n)
 		return FNM_NOMATCH;
 
 	      new_no_leading_period = 1;