gnupg-1.4.2 Excessive warnings when using Sun's cc
David Kirkby
david.kirkby at onetel.net
Tue Dec 6 15:08:00 CET 2005
Werner Koch wrote:
> On Sat, 03 Dec 2005 06:01:26 +0000, David Kirkby said:
>
>
>>I built gnupg-1.4.2 on a Sun Ultra 80 with Solaris 10 and Sun's Studio
>>11 compiler suite (which is now free). Sun's compiler is generally
>>acknowledged to be stricter than gcc, but it gives a lot of warnings
>>when compiling gnupg-1.4.2 - see below.
>
>
> Those signed/unsigned warning are well known and harmless.
There is not only signed/unsigned warnings. The list is long so finding
all the others is not easy, but:
"ccid-driver.c", line 2403: warning: empty translation unit
"pkclist.c", line 439: warning: statement not reached
are two I spotted
> If you
> tell me a compiler option to suppress these warning I will add this as
> a default option for this compiler. We already did this for gcc 4
> which also complains about it.
I don't think finding a compiler option is the right approach to take.
Once you go start going down that slippery slope, you will probably live
to regret it.
Others (myself included) manage to write large bits of C that are okay
with -Wall on gcc.
> GnuPG 1.9 has been changed to to solve the unsigend/signed conflicts
> (needs quite some casts and I still wonder whether this is really for
> the good).
But why does the underlying source need to many casts to avoid the
warnings? I know sometimes casts are necessary (particulary with things
that have void in them, such as fread where you need to cast the pointer
to void). But there should be no need for loads of unsigned/signed
mismatches.
--
David Kirkby,
G8WRB
Please check out http://www.g8wrb.org/
of if you live in Essex http://www.southminster-branch-line.org.uk/
More information about the Gnupg-devel
mailing list