Re: E 0.9.3 release?

Mark Miller <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Sun, Jan 2, 2011 at 4:49 PM, Jon Leonard <[email protected]> wrote:

> On Sun, Jan 02, 2011 at 04:07:59PM -0800, Mark Miller wrote:
> > void print_pos(char *st_line,char *st_cptr)
> > {
> > char *s;
> >
> >   if (st_line == 0) return;
> >   for (s = st_line; *s != '\n'; ++s)
> >     {
> >          if (isprint(*s) || *s == '\t')
>
> The problem is likely to be the implementation of isprint:  It is
> frequently
> implemented as a (lightly protected) lookup in an array.  The warning would
> likely go away if *s were declared or cast unsigned char.
>
> Probably a bug in the isprint implementation, but still a real warning.
>

You seem to be correct. Inserting a "(int)" cast on the first argument to
this call to isprint, and for all other such warnings, doing the same for
the first argument to isdigit, made all these warnings go away. This being
C, it's so far outside my normal programming aesthetics that I have no
strong opinion whether we are better off with these casts and with "-Werror"
or without both. My inclination is to leave my recent change be -- no cast
and "-Werror" suppressed. If this would be a mistake, please let me know.
Thanks.


-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM

_______________________________________________
e-lang mailing list
[email protected]
http://www.eros-os.org/mailman/listinfo/e-lang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.