analyzer lint for win/curses/*.c
There is still an issue in cursmesg.c. The last diff band (curses_putch) isn't related to static analysis.
This commit is contained in:
+11
-4
@@ -508,20 +508,27 @@ curs_destroy_all_wins(void)
|
||||
{
|
||||
curses_count_window((char *) 0); /* clean up orphan */
|
||||
|
||||
#if 0 /* this works but confuses the static analyzer (from llvm-19,
|
||||
* which reports "warning: Use of memory after it is freed") */
|
||||
while (nhwids)
|
||||
curses_del_wid(nhwids->nhwid);
|
||||
#lse
|
||||
while (nhwids) {
|
||||
nethack_wid *tmpptr = nhwids;
|
||||
|
||||
curses_del_wid(tmpptr->nhwid);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Print a single character in the given window at the given coordinates */
|
||||
|
||||
void
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
curses_putch(winid wid, int x, int y, int ch,
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
struct unicode_representation *unicode_representation,
|
||||
int color, int framecolor, int attr)
|
||||
#else
|
||||
curses_putch(winid wid, int x, int y, int ch, int color, int framecolor, int attr)
|
||||
#endif
|
||||
int color, int framecolor, int attr)
|
||||
{
|
||||
static boolean map_initted = FALSE;
|
||||
int sx, sy, ex, ey;
|
||||
|
||||
Reference in New Issue
Block a user