[ntp:questions] Re: use of unsigned char in ntp 4.2.x?

Ulrich Windl Ulrich.Windl at RZ.Uni-Regensburg.DE
Tue Feb 14 08:33:31 UTC 2006

"moof" <secretagentmoof at gmail.com> writes:

> In trying to reduce the number of warnings emitted by newer versions of
> gcc, I noticed that practically all strings are defined as either
> unsigned char or u_char (depending on which bits of source one's
> looking at.) This spews tremendous amounts of warnings when using
> strncpy on any C compiler that uses ANSI - i.e. most of them these
> days.
> Is this a holdover from the days of pre-ansi C? If so, can the majority
> of such strings be changed to be 'just' char?
> Fortunately, most of the remaining warnings are fairly innocuous - lots
> of unused parameters, a fair amount of comparison between signed and
> unsigned [possibly due to the use of signed chars, possibly not], a
> decent amount of missing initializers in structs, a few type-punning
> problems, and a very few 'may be used uninitialized' bits.

>From my experience, signed chars are a source of trouble.


More information about the questions mailing list