static analyzer bit for do_name.c
src/do_name.c(1494): warning C28183: 'aname' could be '0'
This commit is contained in:
@@ -1488,6 +1488,7 @@ do_oname(struct obj *obj)
|
|||||||
a valid artifact name */
|
a valid artifact name */
|
||||||
u.uconduct.literate++;
|
u.uconduct.literate++;
|
||||||
} else if (obj->otyp == objtyp) {
|
} else if (obj->otyp == objtyp) {
|
||||||
|
assert(aname != 0);
|
||||||
/* artifact_name() found a match and restrict_name() didn't reject
|
/* artifact_name() found a match and restrict_name() didn't reject
|
||||||
it; since 'obj' is the right type, naming will change it into an
|
it; since 'obj' is the right type, naming will change it into an
|
||||||
artifact so use canonical capitalization (Sting or Orcrist) */
|
artifact so use canonical capitalization (Sting or Orcrist) */
|
||||||
|
|||||||
Reference in New Issue
Block a user