This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
fwrite_unlocked missing a pair of parensa
- From: ams at kemisten dot nu (Alfred M. Szmidt)
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 11 Aug 2004 00:02:08 +0200 (CEST)
- Subject: fwrite_unlocked missing a pair of parensa
Someone forgot to add parens which causes the following error (on
GNU/Hurd atleast):
gcc argp-fmtstream.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -Wno-parentheses -mpreferred-stack-boundary=2 -fexceptions -I../include -I. -I/ams/libc/libc.obj/argp -I.. -I../libio -I../hurd -I/ams/libc/libc.obj/hurd/ -I../mach -I/ams/libc/libc.obj/mach/ -I/ams/libc/libc.obj -I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman -I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd -I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /ams/libc/libc.obj/argp/argp-fmtstream.o -MD -MP -MF /ams/libc/libc.obj/argp/argp-fmtstream.o.dt -MT /ams/libc/
libc.obj/argp/argp-fmtstream.o
argp-fmtstream.c: In function `__argp_fmtstream_free':
argp-fmtstream.c:109: error: invalid operands to binary -
argp-fmtstream.c: In function `__argp_fmtstream_update':
argp-fmtstream.c:302: error: invalid operands to binary -
argp-fmtstream.c: In function `__argp_fmtstream_ensure':
argp-fmtstream.c:371: error: invalid operands to binary -
make[2]: *** [/ams/libc/libc.obj/argp/argp-fmtstream.o] Error 1
2004-08-10 Alfred M. Szmidt <ams@kemisten.nu>
* libio/bits/stdio.h (fwrite_unlocked): Add missing parentheses
around `n'.
Index: libio/bits/stdio.h
===================================================================
RCS file: /cvs/glibc/libc/libio/bits/stdio.h,v
retrieving revision 1.10
diff -u -r1.10 stdio.h
--- libio/bits/stdio.h 10 Aug 2004 04:38:00 -0000 1.10
+++ libio/bits/stdio.h 10 Aug 2004 21:54:36 -0000
@@ -167,7 +167,7 @@
|| (__builtin_constant_p (n) && (size_t) (n) == 0)) \
/* Evaluate all parameters once. */ \
? ((void) (ptr), (void) (stream), (void) (size), \
- (size_t) n) \
+ (size_t) (n)) \
: fwrite_unlocked (ptr, size, n, stream))))
#endif