[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Joel Reicher
Subject: [Nmh-workers] char args passed to isalpha() et al.
Date: Wed, 11 Apr 2007 18:50:52 +1000

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?


        - Joel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]