fix more clang complaints
Fix some more of the complaints from clang's static analyzer. The one in options.c (manipulating warnings symbols) appears to be an actual bug. All the rest are either because the analysis isn't quite sophicated enough or outright bogus. Two of them appear to be because a static routine is attempting to guard against callers in the same file failing to pass in required output pointers. Stripping away the check for missing pointer should convince the analyzer that those output parameters always receive a value. We'll see once the analysis is eventually re-run....
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1448073071 2015/11/21 02:31:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.247 $ */
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1448094344 2015/11/21 08:25:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.248 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -3781,6 +3781,7 @@ struct trap *ttmp;
|
||||
xchar x = ttmp->tx, y = ttmp->ty, bx, by, cx, cy;
|
||||
boolean unused;
|
||||
|
||||
bx = by = cx = cy = 0; /* lint suppression */
|
||||
/* we know there's no monster in the way, and we're not trapped */
|
||||
if (!Punished
|
||||
|| drag_ball(x, y, &bc, &bx, &by, &cx, &cy, &unused, TRUE)) {
|
||||
|
||||
Reference in New Issue
Block a user