[GCC] multi-character constant warning

From: Chris Jacobson (fear@ATHENET.NET)
Date: 01/05/98


Hello all!

I searched through GCC's manpage and EGCS's manpage (I use EGCS btw), but
couldn't find anything about turning off this warning:

objects.c++:429: warning: multi-character character constant

It occurs in this code fragment:

        while(get_line(fl, line)) {
                if (*line == '$')
                        break;  // Done reading object
                tag_argument(line, tag);
                num = atoi(line);
                tagnum = (tag[0] << 24) + (tag[1] << 16) + (tag[2] << 8) + tag[3];
                switch (tagnum) {
>                       case 'Actn':
                                SSFree(this->actionDesc);
                                this->actionDesc = SSfread(fl, buf, filename);          break;
>                       case 'Affs':    this->affects = asciiflag_conv(line);                           break;
>                       case 'Ammo':
                                sscanf(line, "%d %d", t, t + 1);
                                this->gun.ammo.vnum = t[0];
                                this->gun.ammo.amount = t[1];                                                                   break;
>                       case 'Cost':    this->cost = num;                                                                       break;

(BTW, this compiles and runs fine... I have ascii obj files and pfiles
like this... I'ld share, but they are extremely specific to my own
code... but it should provide an idea)

- Chris Jacobson


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



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