Date: Mon, 29 Nov 1999 11:37:56 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Bill Fumerola <billf@chc-chimes.com> Cc: Martin Cracauer <cracauer@cons.org>, arch@freebsd.org Subject: Re: What to do about "subscript has type `char'" warnings? Message-ID: <199911291937.LAA08363@apollo.backplane.com> References: <Pine.BSF.4.10.9911291334090.59489-100000@jade.chc-chimes.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:
:On Mon, 29 Nov 1999, Matthew Dillon wrote:
:
:> :b) or cast
:> : char *s = syntax[2];
:> : string[(int)*s];
:
:I would suggest using this option and I will be using this in some
:of my -Wall fixes I have in the pipeline.
:
:--
:- bill fumerola - billf@chc-chimes.com - BF1560 - computer horizons corp -
That useage is not portable unless you can guarentee that the characters
in the specified string range only from 0-127.
These useages would be portable:
string[(unsigned char)*s];
string[(int)(unsigned char)*s];
string[(int)(signed char)*s];
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911291937.LAA08363>
