[pulseaudio-discuss] Some patches towards the goal of a warning-free build

Maarten Bosmans mkbosmans at gmail.com
Wed Mar 2 03:44:45 PST 2011


There is also a branch available:
https://github.com/mkbosmans/pulseaudio/compare/warning-free-build
The first commit of that branch is already in master, as it solved a nasty bug.

[PATCH 1/4] Get rid of some unused-function compiler warnings
Nothing to fancy here, I guess.

[PATCH 2/4] Various fixes for build warnings
The only doubtful thing in here, as far as I'm concerced, is the
change in ltdl-helper:
-    *(void**) &f = lt_dlsym(handle, symbol);
+    f = (pa_void_func_t) lt_dlsym(handle, symbol);
The previous line gave a warning about pointer aliasing.
This part of the patch is basically a revert of
http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff;h=e0fd99
It seems it was done like in the rationale section of this document:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html
where *(void**) &f is done to avoid a compiler warning about pointer conversion.
For me, there is no such warning though.

[PATCH 3/4] configure: Drop some warnings
Warnings about reaching inline limits are not so interesting IMHO.
Dropping the =2 on -Wstrict-aliasing reduces the number of false positives.

[PATCH 4/4] Fix up according to Coding Style
This is of course not directly related to compiler warnings.  Its a
lot of small changes.
I tried to be a little conservative, so I let the completely hopeless
files alone.

Maarten



More information about the pulseaudio-discuss mailing list