This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
compile warning in cygwin/stat.h
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 13 Mar 2007 06:30:41 -0600
- Subject: compile warning in cygwin/stat.h
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch: http://cygwin.com/ml/cygwin-cvs/2007-q1/msg00123.html
breaks compilation of coreutils against the latest snapshot when using
- -Wall -Werror, due to an unused expression on the left of a comma.
2007-03-13 Eric Blake <ebb9@byu.net>
* include/cygwin/stat.h (S_TYPEISSHM, S_TYPEISSEM, S_TYPEISSHM):
Avoid compiler warnings.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9plw84KuGfSFAYARAotJAJ9BAhe/pj0BKfM4hnnv9Nz0h+ebiwCcCkZ+
eo+aekowcQMQsmIZMyAIrU0=
=BSsC
-----END PGP SIGNATURE-----
Index: include/cygwin/stat.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/stat.h,v
retrieving revision 1.10
diff -u -p -r1.10 stat.h
--- include/cygwin/stat.h 6 Mar 2007 14:56:44 -0000 1.10
+++ include/cygwin/stat.h 13 Mar 2007 12:26:19 -0000
@@ -91,9 +91,9 @@ struct stat
/* POSIX IPC objects are not implemented as distinct file types, so the
below macros have to return 0. The expression is supposed to catch
illegal usage with non-stat parameters. */
-#define S_TYPEISMQ(buf) ((buf)->st_mode,0)
-#define S_TYPEISSEM(buf) ((buf)->st_mode,0)
-#define S_TYPEISSHM(buf) ((buf)->st_mode,0)
+#define S_TYPEISMQ(buf) ((void)(buf)->st_mode,0)
+#define S_TYPEISSEM(buf) ((void)(buf)->st_mode,0)
+#define S_TYPEISSHM(buf) ((void)(buf)->st_mode,0)
#ifdef __cplusplus
}