clear up some reported curses warnings
This commit is contained in:
@@ -392,6 +392,7 @@ curses_ext_cmd()
|
||||
extwin = newwin(1, w - 2, y0 + 1, x0 + 1);
|
||||
if (w - 4 < maxlen)
|
||||
maxlen = w - 4;
|
||||
nhUse(h); /* needed only to give getmaxyx three arguments */
|
||||
} else {
|
||||
curses_get_window_xy(MESSAGE_WIN, &winx, &winy);
|
||||
curses_get_window_size(MESSAGE_WIN, &messageh, &messagew);
|
||||
|
||||
@@ -462,7 +462,7 @@ curses_choose_character()
|
||||
tmpchoice[count] = toupper(tmpchoice[count]);
|
||||
}
|
||||
|
||||
sprintf(choice, "%s%s", choice, tmpchoice);
|
||||
strcat(choice, tmpchoice);
|
||||
|
||||
/* prevent an unnecessary prompt */
|
||||
rigid_role_checks();
|
||||
|
||||
@@ -202,7 +202,7 @@ curses_block(boolean noscroll) /* noscroll - blocking because of msgtype
|
||||
prev_x = mx, prev_y = my;
|
||||
blink = 0;
|
||||
}
|
||||
moreattr = !iflags.wc2_guicolor ? A_REVERSE : NONE;
|
||||
moreattr = !iflags.wc2_guicolor ? (int) A_REVERSE : NONE;
|
||||
curses_toggle_color_attr(win, MORECOLOR, moreattr, ON);
|
||||
if (blink) {
|
||||
wattron(win, A_BLINK);
|
||||
|
||||
@@ -40,13 +40,18 @@ static int parse_escape_sequence(void);
|
||||
int
|
||||
curses_read_char()
|
||||
{
|
||||
int ch, tmpch;
|
||||
int ch;
|
||||
#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z)
|
||||
int tmpch;
|
||||
#endif
|
||||
|
||||
/* cancel message suppression; all messages have had a chance to be read */
|
||||
curses_got_input();
|
||||
|
||||
ch = getch();
|
||||
#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z)
|
||||
tmpch = ch;
|
||||
#endif
|
||||
ch = curses_convert_keys(ch);
|
||||
|
||||
if (ch == 0) {
|
||||
@@ -372,7 +377,6 @@ curses_str_remainder(const char *str, int width, int line_num)
|
||||
int strsize = strlen(str) + 1;
|
||||
#if __STDC_VERSION__ >= 199901L
|
||||
char substr[strsize];
|
||||
char curstr[strsize];
|
||||
char tmpstr[strsize];
|
||||
|
||||
strcpy(substr, str);
|
||||
@@ -381,7 +385,6 @@ curses_str_remainder(const char *str, int width, int line_num)
|
||||
#define BUFSZ 256
|
||||
#endif
|
||||
char substr[BUFSZ * 2];
|
||||
char curstr[BUFSZ * 2];
|
||||
char tmpstr[BUFSZ * 2];
|
||||
|
||||
if (strsize > (BUFSZ * 2) - 1) {
|
||||
@@ -409,10 +412,6 @@ curses_str_remainder(const char *str, int width, int line_num)
|
||||
if (last_space == 0) { /* No spaces found */
|
||||
last_space = count - 1;
|
||||
}
|
||||
for (count = 0; count < last_space; count++) {
|
||||
curstr[count] = substr[count];
|
||||
}
|
||||
curstr[count] = '\0';
|
||||
if (substr[count] == '\0') {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@ draw_status()
|
||||
curs_reset_windows(TRUE, TRUE);
|
||||
win = curses_get_nhwin(STATUS_WIN);
|
||||
}
|
||||
nhUse(ax); /* getmaxyx macro isn't sufficient */
|
||||
}
|
||||
|
||||
werase(win);
|
||||
@@ -513,6 +514,7 @@ boolean border;
|
||||
conditions would go if they were on this line */
|
||||
condstart += (cap_and_hunger == 2) ? spacing[BL_CAP]
|
||||
: (cap_and_hunger == 0) ? 1 : 0;
|
||||
nhUse(conddummy); /* getyx needed 3 args */
|
||||
}
|
||||
if (!(cap_and_hunger & 1))
|
||||
continue;
|
||||
@@ -533,6 +535,7 @@ boolean border;
|
||||
t = (width - (border ? 0 : 1)) - (ex - 1);
|
||||
ebuf[max(t, 2)] = '\0'; /* might still wrap... */
|
||||
}
|
||||
nhUse(ey); /* getyx needed 3 args */
|
||||
}
|
||||
break;
|
||||
case BL_SCORE:
|
||||
|
||||
Reference in New Issue
Block a user