[ccache] Compiler warnings in ccache 3.2.3

Tom Lane tgl at sss.pgh.pa.us
Sun Aug 16 21:07:19 UTC 2015


I got a few warnings about assignments of pointers to "bool" values.
I think these are legitimate gripes, because on platforms where bool
is only a byte wide, the net effect will be to assign the pointer's
low-order byte to the bool.  There's at least a 1-in-256 chance of
a non-null pointer erroneously converting to a "false" boolean value
(maybe more than that, if the pointer is likely to be aligned ...).

I propose the attached patches to fix this.

			regards, tom lane

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-bool-conversions.patch
Type: text/x-diff
Size: 1975 bytes
Desc: fix-bool-conversions.patch
URL: <http://lists.samba.org/pipermail/ccache/attachments/20150816/7c9bf7ef/fix-bool-conversions.diff>


More information about the ccache mailing list