This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

how to remove the warning


Hai,
 We are developing DECT protocol stack in linux, during the complication we are
get a warning, i would like know how i can rectify this.

warning: array `printColorStr' assumed to have one element

printColorStr variable is defined in screenio.c
unsigned char printColorStr[]  =  {"\033[1;3%c;4%cm"};

and screenio.h is using the above variable
extern unsigned char printColorStr[];
#define PrintColor(fg, bg);       printf(printColorStr, fg, bg);

screenio.h is included in lot of other *.c files, all those places this
warning is coming except in screenio.c.

recently we have ported our application to redhat 6.2, gcc version egcs-2.91.66
, previously we were using slackware, there we did not get any warning.

regards
Sunil.M


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]