[cfe-commits] [PATCH] Suppress -Wunused-value for explicit casts in macros
matthewbg at google.com
Tue Oct 23 13:48:48 PDT 2012
The motivating case here is that OpenSSL has some code like this:
static long bio_ctrl(BIO *bio, int cmd, long num, void *ptr);
#define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
That cast to int causes client code which calls BIO_flush and ignores
the result to get a -Wunused-value warning.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 922 bytes
Desc: not available
More information about the cfe-commits