Current gcc warnings on ia64, hppa and sparc
julien at trigofacile.com
Sun Jun 30 11:16:22 UTC 2013
> In the current rra-c-util, I've added (const void *) casts before the
> final casts for all of those assignments to try to suppress the warnings,
> as in:
> sin6 = (const struct sockaddr_in6 *) (const void *) addr;
> in network_sockaddr_sprint. However, I don't know if that actually worked
> since I don't have a system that issues this warning on which I can easily
I confirm it works. I have just tried the change on a system that
issues the warning; I confirm this warning is no longer returned.
>> lib/getaddrinfo-t.c: In function 'main':
>> lib/getaddrinfo-t.c:74: warning: cast increases required alignment of target type
> These, on the other hand, are unavoidable and correct. Here too I don't
> know if casting to void * first would suppress the warning.
I also confirm that changing:
saddr = (struct sockaddr_in *) ai->ai_addr;
saddr = (struct sockaddr_in *) (const void *) ai->ai_addr;
suppress the warning.
> All of the uses of sprintf above are, of course, safe.
OK, thanks for having had a look at them, and of course your answer.
Have a nice week,
« Ne craignez pas d'être lent, craignez seulement d'être à
More information about the inn-workers