invent.c: In function 'getobj':
invent.c:1579:29: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
1579 | if (cnt < 1 || otmp->quan <= cnt)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
invent.c:1529:10: note: 'cnt' was declared here
1529 | long cnt;
| ^~~
../win/X11/winstat.c: In function 'update_fancy_status_field':
../win/X11/winstat.c:1920:28: warning: declaration of 'active' shadows a global declaration [-Wshadow]
1920 | static boolean active = FALSE;
| ^~~~~~
In file included from ../include/hack.h:196,
from ../win/X11/winstat.c:36:
../include/wintype.h:180:5: note: shadowed declaration is here
180 | active = 0x001,
| ^~~~~~
* between "you don't have anything to <foo>"
* versus "you don't have anything _else_ to <foo>"
* (also used for GETOBJ_EXCLUDE_NONINVENT) */
- long cnt;
+ long cnt = 0L;
boolean cntgiven = FALSE;
boolean msggiven = FALSE;
boolean oneloop = FALSE;
*
* Break out with this.
*/
- static boolean active = FALSE;
+ static boolean isactive = FALSE;
- if (!active) {
- active = TRUE;
+ if (!isactive) {
+ isactive = TRUE;
impossible("update_other: unknown shown value");
- active = FALSE;
+ isactive = FALSE;
}
val = 0L;
break;