static analyzer bit for artifact.c

src/artifact.c(1589): warning C6011: Dereferencing NULL pointer 'magr'.

The 'struct monst *magr' parameter to artifact_hit() can be Null
if 'mdef' is youmonst. mdef is nonnull.
This commit is contained in:
nhmall
2023-12-23 22:55:14 -05:00
parent 7e131649c4
commit 93bcfeac29
2 changed files with 2 additions and 1 deletions

View File

@@ -155,7 +155,7 @@ extern boolean undiscovered_artifact(xint16);
extern int disp_artifact_discoveries(winid);
extern void dump_artifact_info(winid);
extern boolean artifact_hit(struct monst *, struct monst *, struct obj *,
int *, int);
int *, int) NONNULLARG2;
extern int doinvoke(void);
extern boolean finesse_ahriman(struct obj *);
extern int arti_speak(struct obj *);