Re: [CODE] Warning: array subscript has type 'char'

From: George Greer (greerga@circlemud.org)
Date: 12/27/99


On Sun, 26 Dec 1999, Robert Moon wrote:

>I am receving an error message that I don't understand why.  The message is
>"warning: array subscript has type 'char'" for the line:
>
>  if (start_emp[i][GET_RACE(d->character)]) {

The race variable is a 'byte' or 'char'.  Use -Wno-char-subscripts (if you
use GCC). Newer CircleMUD configure scripts (bpl14+ I think) catch that
automatically.

--
George Greer            | My desktop computer project code.
greerga@circlemud.org   | http://moving.m-l.org/~greerga/


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST