[PATCH] Fix: transaction id usage in gisi/server.c
Rémi Denis-Courmont
remi at remlab.net
Fri Apr 23 06:46:28 PDT 2010
On Fri, 23 Apr 2010 16:07:11 +0300, Pekka Pessi <ppessi at gmail.com> wrote:
> 2010/4/23 Denis Kenzior <denkenz at gmail.com>:
>>> + (void *)&spn, (sizeof spn)) !=
> (sizeof req)) {
>>
>> Casting to or from void is not necessary.
>
> Oh, it is. If a struct sockaddr_pn structure is casted directly to
> struct sockaddr, gcc will issue alignment warning on ARM.
The cast-align warning is a can of false positives. First that warning
should probably not be enabled. It does nothing on x86, and it's a waste of
time with ARM and other pointer-picky platforms.
Most importantly, using -Werror _by_default_ is a _damn_idiotic_ idea. Been
there, done that. One cannot know what weird warning any given compiler or
version thereof will ever return. And then I don't need to mention "bugs"
in header files from underlying components. Even changing GCC optimization
levels can yield different conflicting warnings. That's known to happen for
uninitialized values detection, which relies on optimization-dependent code
analysis as an example.
Note that recent GCC versions allow turning only some warnings as errors
with -Werror... and -Wno-error.... That's much saner; for instance calling
a function without prototype is clearly a bug and it is quite reasonable to
make it an error.
--
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
More information about the ofono
mailing list