[prev in list] [next in list] [prev in thread] [next in thread]
List: inn-workers
Subject: Re: Current gcc warnings on ia64, hppa and sparc
From: Julien ÉLIE <julien () trigofacile ! com>
Date: 2013-06-30 11:16:22
Message-ID: 51D01386.305 () trigofacile ! com
[Download RAW message or body]
Hi Russ,
> 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
> test.
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.
Thanks, Russ.
>> 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;
to:
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,
--
Julien ÉLIE
« Ne craignez pas d'être lent, craignez seulement d'être Ã
l'arrêt. »
_______________________________________________
inn-workers mailing list
inn-workers@lists.isc.org
https://lists.isc.org/mailman/listinfo/inn-workers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic