nmh-workers
[Top] [All Lists]

[Nmh-workers] char args passed to isalpha() et al.

2007-04-11 01:52:48
Functions such as isalpha() take an int argument, but in lots of places
the nmh code passes a char (actually a dereferenced char pointer).

I imagine on many platforms this isn't an issue, but on mine (NetBSD 3.1)
these functions are macros that expand to array lookups, and gcc gives
lots of warnings like

mhbuildsbr.c:690: warning: subscript has type `char'

as a result.

The warnings are annoying, and make it hard to spot other warnings.
I have three choices. One is to use -Wno-char-subscripts. I don't like
this option. Another is to explicitly cast to int everywhere. That
seems to be the most harmless. The third is to accept that this might be
an oddity of NetBSD and let it go.

Does anybody mind if I put the int casts in? Should I go with a different
option? Have I missed something?

Cheers,

        - Joel


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>