Wine: Use the compiler option -Wpointer-arith if available.
mstefani at redhat.com
Sun Apr 17 15:09:40 CDT 2011
On 04/17/2011 01:19 AM, Gerald Pfeifer wrote:
> GCC provides an option -Wpointer-arith and describes it as follows:
> Warn about anything that depends on the "size of" a function type
> or of `void'. GNU C assigns these types a size of 1, for
> convenience in calculations with `void *' pointers and pointers to
> This does not trigger on my Wine builds, but then we should not invoke
Of course it doesn't triggers in Wine as -Wpointer-arith is already
enabled. I made heavy use of that when I did my pointer cast killing
spree a few years ago.
> sizeof(void) or sizeof(some_function). ;-) It should help catch any
> such bad future uses of sizeof.
> configure.ac | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
> diff --git a/configure.ac b/configure.ac
> index 6047744..0ae6625 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1715,6 +1715,7 @@ then
> + WINE_TRY_CFLAGS([-Wpointer-arith])
More information about the wine-devel