r224549 - [c Sema]. Patch fixes pointer-bool-conversion warning on C code

jahanian fjahanian at apple.com
Mon Dec 22 09:55:39 PST 2014


On Dec 19, 2014, at 10:51 AM, David Blaikie <dblaikie at gmail.com> wrote:

> 
> -
> +// rdar://19256338
> +#define SAVE_READ(PTR, RESULT) if( (PTR) && *(PTR) ) *RESULT=*PTR;
> +
> +// Source
> +typedef unsigned char Boolean;
> +struct HTTPClientPrivate
> +{
> +   Boolean readSuspended;
> +};
> +typedef struct HTTPClientPrivate * HTTPClientRef;
> +static void _HTTPClientErrorHandler( HTTPClientRef me)
> +{
> +  Boolean result;
> +  SAVE_READ(&me->readSuspended, &result);
> +}
> 
> Could this test case be a bit simpler to highlight the specific issue being tested/addressed here? (I assume the test case doesn't require a class/struct, or two macro parameters, etc, etc… )
In r224713.
- Fariborz

>  
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141222/bd3c69b7/attachment.html>


More information about the cfe-commits mailing list