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

moof secretagentmoof at gmail.com
Fri Feb 3 15:51:19 UTC 2006

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

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.

More information about the questions mailing list