projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
16caba0
)
Add const where necessary to avoid warnings.
author
drepper
<drepper>
Tue, 28 Nov 2000 22:10:18 +0000
(22:10 +0000)
committer
drepper
<drepper>
Tue, 28 Nov 2000 22:10:18 +0000
(22:10 +0000)
time/strftime.c
patch
|
blob
|
history
diff --git
a/time/strftime.c
b/time/strftime.c
index
2f99143
..
08b5b49
100644
(file)
--- a/
time/strftime.c
+++ b/
time/strftime.c
@@
-287,7
+287,7
@@
static const CHAR_T zeroes[16] = /* "0000000000000000" */
else if (to_uppcase) \
memcpy_uppcase (p, (s), _n); \
else \
else if (to_uppcase) \
memcpy_uppcase (p, (s), _n); \
else \
- MEMCPY ((PTR) p, (PTR) (s), _n))
+ MEMCPY ((PTR) p, (
const
PTR) (s), _n))
#ifdef COMPILE_WIDE
# define widen(os, ws, l) \
#ifdef COMPILE_WIDE
# define widen(os, ws, l) \
@@
-791,10
+791,11
@@
my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == 'E'
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == 'E'
- && (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
- NLW(ERA_D_T_FMT)))
+ && (*(subfmt =
+ (const CHAR_T *) _NL_CURRENT (LC_TIME,
+ NLW(ERA_D_T_FMT)))
!= '\0')))
!= '\0')))
- subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
+ subfmt = (
const
CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_T_FMT));
#else
# if HAVE_STRFTIME
goto underlying_strftime;
#else
# if HAVE_STRFTIME
goto underlying_strftime;
@@
-885,10
+886,10
@@
my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
- && (*(subfmt =
(CHAR_T *)_NL_CURRENT (LC_TIME,
-
NLW(ERA_D_FMT)))
+ && (*(subfmt =
+
(const CHAR_T *)_NL_CURRENT (LC_TIME,
NLW(ERA_D_FMT)))
!= L_('\0'))))
!= L_('\0'))))
- subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
+ subfmt = (
const
CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
goto subformat;
#else
# if HAVE_STRFTIME
goto subformat;
#else
# if HAVE_STRFTIME
@@
-1071,8
+1072,9
@@
my_strftime (s, maxsize, format, tp ut_argument)
case L_('r'): /* POSIX.2 extension. */
#ifdef _NL_CURRENT
case L_('r'): /* POSIX.2 extension. */
#ifdef _NL_CURRENT
- if (*(subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME,
- NLW(T_FMT_AMPM))) == L_('\0'))
+ if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME,
+ NLW(T_FMT_AMPM)))
+ == L_('\0'))
#endif
subfmt = L_("%I:%M:%S %p");
goto subformat;
#endif
subfmt = L_("%I:%M:%S %p");
goto subformat;
@@
-1127,10
+1129,10
@@
my_strftime (s, maxsize, format, tp ut_argument)
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
goto bad_format;
#ifdef _NL_CURRENT
if (! (modifier == L_('E')
- && (*(subfmt =
(CHAR_T *) _NL_CURRENT (LC_TIME,
-
NLW(ERA_T_FMT)))
+ && (*(subfmt =
+
(const CHAR_T *) _NL_CURRENT (LC_TIME,
NLW(ERA_T_FMT)))
!= L_('\0'))))
!= L_('\0'))))
- subfmt = (CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
+ subfmt = (
const
CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT));
goto subformat;
#else
# if HAVE_STRFTIME
goto subformat;
#else
# if HAVE_STRFTIME