diff options
author | Andreas Jaeger <aj@suse.de> | 2012-05-09 16:47:57 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-05-09 16:47:57 +0200 |
commit | 1a4b75a190006bb013a61f2031a4de86e93a629f (patch) | |
tree | 124161c731370e44a7acf1ff86b95ba9d85fa17f /string | |
parent | b1cc2472d26084ec88b53606baabb82ec6b80db2 (diff) | |
download | glibc-1a4b75a190006bb013a61f2031a4de86e93a629f.zip glibc-1a4b75a190006bb013a61f2031a4de86e93a629f.tar.gz glibc-1a4b75a190006bb013a61f2031a4de86e93a629f.tar.bz2 |
Fix strspn warning with -Wconversion
[BZ #14083]
Fix warning when using strspn with -Wconversion:
$ gcc -Wconversion -O t.c
t.c: In function ‘main’:
t.c:8:7: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
Diffstat (limited to 'string')
-rw-r--r-- | string/bits/string2.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h index af5c88c..bbf05a3 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1014,7 +1014,7 @@ __strcspn_c3 (const char *__s, int __reject1, int __reject2, ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) \ ? __builtin_strspn (s, accept) \ : ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ + ? ((void) (s), (size_t) 0) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? __strspn_c1 (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ @@ -1029,7 +1029,7 @@ __strcspn_c3 (const char *__s, int __reject1, int __reject2, ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ + ? ((void) (s), (size_t) 0) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? __strspn_c1 (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ |