Bear in mind that I'm a hobbyist, not even in a CS related field, and I'm using this project as a learning tool - previously I have learned C under Borland Turbo C 2.01 (I know, pre-ANSI standard).
Currently I am using Pelles C 11.00.2 to update a multifile SAA/CUA under Win32 ConsoleAPI (no VT code, sorry, in this initial conversion), I have been able to hunt, revise and update the code to get rid of most of the obnoxius and some of the repetitive warnings that pop-up along the code, using Beej's guide and Jan's Bodnar Win API tutorial.
My current flags for POCC are:
-Tx86-coff -std:C17 -Zi -MT -Ot -Ob1 -fp:precise -W2 -Gd -Ze -Zx -openmp -Gi -J
And the warnings that are giving me some flack are:
calendar.c(216): warning #2272: '54' is not a member of 'enum grounds'
and
calendar.c(217): warning #2071: Overflow or truncation in constant expression.
while the definition of grounds is as follow
enum grounds {FG, BG};
enum colortypes {STD_COLOR, SELECT_COLOR, FRAME_COLOR, HILITE_COLOR};
and the calling code is
sprintf(dyln, "%c%c%c%2d %c", CHANGECOLOR, ((wnd->WindowColors[SELECT_COLOR][FG]) + 0x80), ((wnd->WindowColors[SELECT_COLOR][BG]) + 0x80), dy, RESETCOLOR);
in which
#define CHANGECOLOR (unsigned char) 174
#define RESETCOLOR (unsigned char) 175
typedef struct window
{
char WindowColors[4][2];
} WINDOW;
WINDOW wnd;
char dyln[11];
int week;
int day;
int dy = dys[week * 7 + day];
That being said that is an example of the code that throws this kind of error, but I'm unable to see what I'm doing wrong or how can I locate my mistake that is keeping up this warning.