mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
(strtol): Add some more casts to avoid warnings.
This commit is contained in:
parent
05b2fb299d
commit
4124ff9971
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
/* Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ fmtmsg (long int classification, const char *label, int severity,
|
|||||||
do_action ? "TO FIX: " : "",
|
do_action ? "TO FIX: " : "",
|
||||||
do_action ? action : "",
|
do_action ? action : "",
|
||||||
do_action && do_tag ? " " : "",
|
do_action && do_tag ? " " : "",
|
||||||
do_tag ? tag : "") == WEOF)
|
do_tag ? tag : "") < 0)
|
||||||
/* Oh, oh. An error occurred during the output. */
|
/* Oh, oh. An error occurred during the output. */
|
||||||
result = MM_NOMSG;
|
result = MM_NOMSG;
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ fmtmsg (long int classification, const char *label, int severity,
|
|||||||
do_action ? "TO FIX: " : "",
|
do_action ? "TO FIX: " : "",
|
||||||
do_action ? action : "",
|
do_action ? action : "",
|
||||||
do_action && do_tag ? " " : "",
|
do_action && do_tag ? " " : "",
|
||||||
do_tag ? tag : "") == EOF)
|
do_tag ? tag : "") < 0)
|
||||||
/* Oh, oh. An error occurred during the output. */
|
/* Oh, oh. An error occurred during the output. */
|
||||||
result = MM_NOMSG;
|
result = MM_NOMSG;
|
||||||
}
|
}
|
||||||
|
@ -676,8 +676,8 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM)
|
|||||||
/* If no other digit but a '0' is found the result is 0.0.
|
/* If no other digit but a '0' is found the result is 0.0.
|
||||||
Return current read pointer. */
|
Return current read pointer. */
|
||||||
if ((c < L_('0') || c > L_('9'))
|
if ((c < L_('0') || c > L_('9'))
|
||||||
&& (base == 16 && (c < (wint_t) TOLOWER (L_('a'))
|
&& (base == 16 && (c < (CHAR_TYPE) TOLOWER (L_('a'))
|
||||||
|| c > (wint_t) TOLOWER (L_('f'))))
|
|| c > (CHAR_TYPE) TOLOWER (L_('f'))))
|
||||||
#ifdef USE_WIDE_CHAR
|
#ifdef USE_WIDE_CHAR
|
||||||
&& c != (wint_t) decimal
|
&& c != (wint_t) decimal
|
||||||
#else
|
#else
|
||||||
|
@ -361,9 +361,9 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
for (c = *end; c != L_('\0'); c = *++end)
|
for (c = *end; c != L_('\0'); c = *++end)
|
||||||
if (((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
|
if (((STRING_TYPE) c < L_('0') || (STRING_TYPE) c > L_('9'))
|
||||||
# ifdef USE_WIDE_CHAR
|
# ifdef USE_WIDE_CHAR
|
||||||
&& c != thousands
|
&& (wchar_t) c != thousands
|
||||||
# else
|
# else
|
||||||
&& ({ for (cnt = 0; cnt < thousands_len; ++cnt)
|
&& ({ for (cnt = 0; cnt < thousands_len; ++cnt)
|
||||||
if (thousands[cnt] != end[cnt])
|
if (thousands[cnt] != end[cnt])
|
||||||
@ -400,7 +400,7 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
|||||||
c -= L_('0');
|
c -= L_('0');
|
||||||
#ifdef USE_NUMBER_GROUPING
|
#ifdef USE_NUMBER_GROUPING
|
||||||
# ifdef USE_WIDE_CHAR
|
# ifdef USE_WIDE_CHAR
|
||||||
else if (grouping && c == thousands)
|
else if (grouping && (wchar_t) c == thousands)
|
||||||
continue;
|
continue;
|
||||||
# else
|
# else
|
||||||
else if (thousands_len)
|
else if (thousands_len)
|
||||||
@ -448,7 +448,7 @@ INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
|
|||||||
c -= L_('0');
|
c -= L_('0');
|
||||||
#ifdef USE_NUMBER_GROUPING
|
#ifdef USE_NUMBER_GROUPING
|
||||||
# ifdef USE_WIDE_CHAR
|
# ifdef USE_WIDE_CHAR
|
||||||
else if (grouping && c == thousands)
|
else if (grouping && (wchar_t) c == thousands)
|
||||||
continue;
|
continue;
|
||||||
# else
|
# else
|
||||||
else if (thousands_len)
|
else if (thousands_len)
|
||||||
|
Loading…
Reference in New Issue
Block a user