[systemd-devel] Build warnings for ARM due to -Wcast-align

Daniel Mack daniel at zonque.org
Thu Feb 20 08:41:32 PST 2014


On 02/20/2014 05:28 PM, Daniel P. Berrange wrote:
> On Thu, Feb 20, 2014 at 05:21:22PM +0100, Lennart Poettering wrote:

>> I am fine with that. I am personally only running things on x86, so it
>> never showed up for me. The usual solution for cast issues is to use
>> some union-based type conversion, but in the case above this is not
>> really nicely possible. Hence, let's drop it, unless somebody has a
>> better solution...
> 
> I think cast align warnings are fairly useful since many things it
> can show turn out to be genuine bugs, so not entirely desirable to
> disable them altogether. In libvirt we just mark the few cases which
> are false positives with a pragma

Hmm, but we're talking about ~160 places here.

> And then just mark it thus
> 
>   VIR_WARNINGS_NO_CAST_ALIGN
>   ...code with false positive
>   VIR_WARNINGS_RESET

I see your point, but it would really mean to add such things at a lot
of places all over the tree.


Daniel


More information about the systemd-devel mailing list