From f521be31b96b5ca8b6d24c388d644f5dfcafac7d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 26 Apr 2009 18:06:47 +0000 Subject: * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init): Avoid warning by using may_alias attribute on ptrhack. --- stdlib/strfmon_l.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'stdlib/strfmon_l.c') diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c index 8e63d459e3..eb7a17801a 100644 --- a/stdlib/strfmon_l.c +++ b/stdlib/strfmon_l.c @@ -90,9 +90,6 @@ __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, { struct locale_data *current = loc->__locales[LC_MONETARY]; _IO_strfile f; -#ifdef _IO_MTSAFE_IO - _IO_lock_t lock; -#endif struct printf_info info; char *dest; /* Pointer so copy the output. */ const char *fmt; /* Pointer that walks through format. */ @@ -517,11 +514,11 @@ __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, /* Print the number. */ #ifdef _IO_MTSAFE_IO - f._sbf._f._lock = &lock; + f._sbf._f._lock = NULL; #endif - INTUSE(_IO_init) ((_IO_FILE *) &f, 0); - _IO_JUMPS ((struct _IO_FILE_plus *) &f) = &_IO_str_jumps; - INTUSE(_IO_str_init_static) ((_IO_strfile *) &f, dest, + INTUSE(_IO_init) (&f._sbf._f, 0); + _IO_JUMPS (&f._sbf) = &_IO_str_jumps; + INTUSE(_IO_str_init_static) (&f, dest, (s + maxsize) - dest, dest); /* We clear the last available byte so we can find out whether the numeric representation is too long. */ @@ -537,7 +534,7 @@ __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, info.extra = 1; /* This means use values from LC_MONETARY. */ ptr = &fpnum; - done = __printf_fp ((FILE *) &f, &info, &ptr); + done = __printf_fp (&f._sbf._f, &info, &ptr); if (done < 0) return -1; -- cgit 1.4.1