make zeroany, zeromonst, zeroobj 'const'
They're never modified. Minor complication: &zeroobj is used as a special not-Null-but-not-an-object value in multiple places and needs to have 'const' removed with a cast in that situation.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 decl.c $NHDT-Date: 1446975463 2015/11/08 09:37:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */
|
||||
/* NetHack 3.6 decl.c $NHDT-Date: 1547025164 2019/01/09 09:12:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.141 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2009. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -198,10 +198,10 @@ NEARDATA struct obj *migrating_objs = (struct obj *) 0;
|
||||
NEARDATA struct obj *billobjs = (struct obj *) 0;
|
||||
|
||||
/* used to zero all elements of a struct obj and a struct monst */
|
||||
NEARDATA struct obj zeroobj = DUMMY;
|
||||
NEARDATA struct monst zeromonst = DUMMY;
|
||||
NEARDATA const struct obj zeroobj = DUMMY;
|
||||
NEARDATA const struct monst zeromonst = DUMMY;
|
||||
/* used to zero out union any; initializer deliberately omitted */
|
||||
NEARDATA anything zeroany;
|
||||
NEARDATA const anything zeroany;
|
||||
|
||||
/* originally from dog.c */
|
||||
NEARDATA char dogname[PL_PSIZ] = DUMMY;
|
||||
|
||||
Reference in New Issue
Block a user