From cec34dbcb98851e84d23e549a3814d4d70894e22 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 19 Feb 2000 05:27:17 +0000 Subject: [PATCH] (strnlen): Add cast to prevent warning. --- string/bits/string2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string/bits/string2.h b/string/bits/string2.h index ccc0742edb..811e8d0df8 100644 --- a/string/bits/string2.h +++ b/string/bits/string2.h @@ -1026,7 +1026,7 @@ __STRING_INLINE size_t strnlen (__const char *__string, size_t __maxlen) { __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? __end - __string : __maxlen; + return __end ? (size_t) (__end - __string) : __maxlen; } # endif #endif