`byte' typedef?

David Champion dgc at uchicago.edu
Tue Jul 2 21:35:02 CEST 2002


* On 2002.07.02, in <8765zyfun5.fsf at alberti.gnupg.de>,
*	"Werner Koch" <wk at gnupg.org> wrote:
> On Mon, 1 Jul 2002 15:09:23 -0500, David Champion said:
> 
> > But that only works if one of the entities being compared is a void*.
> 
> I was more thinking about assigning.

OK, not sure where this answers the questions/concerns, then.


> > If one isn't, then you have to prototype as void* (gnupg doesn't) or
> 
> memcmp takes void *. strcmp takes char * which is corect in this case.

Yes, but the conflicts aren't with ANSI functions, they're with GnuPG
functions....


> No.  All type conflicts are to be solved ... except for unsigned char*
> and signed char* mismatches; we can't get rid of them and I can't
> think of a machine where these are really distinct types like function
> and data pointers are.

Nor can I, but they're extra trouble (noisy output leads one to believe
there might be a problem where in fact there is not), and it appears
that they can be eliminated. That's why I'm writing, to see what
approach you'd prefer.


> > particular conflict? Or would you rather I submit a patch setting the
> > Solaris CC to "cc -erroff=E_ARG_INCOMPATIBLE_WITH_ARG", and cause gnupg
> 
> IBM compiler have ption just for the signed/unsigned mismatch.

OK, it's not that I don't believe you -- I just don't see any way to
eliminate those on the compiler I'm using.


> > I just want to see warnings in stock code disappear, and I'm trying to
> > help make it happen.
> 
> I don't see any warnings with my compiler when using -Wall
> -Wcast-align -Wshadow -Wstrict-prototypes.

Do you want to see mine?

I'm just going on the principle that a type conflict is a type conflict
even if it's a safe type conflict, and you can't necessarily hide the
safe conflicts on all platforms, but you can (usually) resolve the
conflicts. Why do I care? Because it's easier to be confident that there
are no problems when there are no warnings than it is when you need to
filter through the warnings to figure out which ones matter. (And I see
a LOT of warnings.)

I'm asking what I should do about this, if I see a problem and I want to
help, but I'm not sure what you're answering, unless it's that you don't
see the same problem and I should forget about it.

-- 
 -D.			Fresh fruit enriches everyone.  Takes the thirst
 ENSA, NSIT		out of everyday time.  A pure whiff of oxygen,
 University of Chicago	painting over a monochrome world in primary colors.
 dgc at uchicago.edu	We all know that.  It's why everyone loves fruit.




More information about the Gnupg-devel mailing list