[cfe-commits] [PATCH] Suppress -Wunused-value for explicit casts in macros
Matt Beaumont-Gay
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.
-Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused-value-macro.patch
Type: application/octet-stream
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121023/de706ec0/attachment.obj>
More information about the cfe-commits
mailing list