fix -Wmissing-prototypes warning
drawing.c doesn't include extern.h, so the def_char_... functions it defines aren't preceded by a prototype. Having such guaantees that code in other files sees the same argument types as in the defining code.
This commit is contained in:
11
include/rm.h
11
include/rm.h
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 rm.h $NHDT-Date: 1580070206 2020/01/26 20:23:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.78 $ */
|
/* NetHack 3.6 rm.h $NHDT-Date: 1589064684 2020/05/09 22:51:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.82 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Pasi Kallinen, 2017. */
|
/*-Copyright (c) Pasi Kallinen, 2017. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -664,4 +664,13 @@ typedef struct {
|
|||||||
/* restricted movement, potential luck penalties */
|
/* restricted movement, potential luck penalties */
|
||||||
#define Sokoban g.level.flags.sokoban_rules
|
#define Sokoban g.level.flags.sokoban_rules
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These prototypes are in extern.h but some of the code which uses them
|
||||||
|
* includes config.h instead of hack.h so doesn't see extern.h.
|
||||||
|
*/
|
||||||
|
/* ### drawing.c ### */
|
||||||
|
extern int FDECL(def_char_to_objclass, (CHAR_P));
|
||||||
|
extern int FDECL(def_char_to_monclass, (CHAR_P));
|
||||||
|
extern int FDECL(def_char_is_furniture, (CHAR_P));
|
||||||
|
|
||||||
#endif /* RM_H */
|
#endif /* RM_H */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 tilemap.c $NHDT-Date: 1542501042 2018/11/18 00:30:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.35 $ */
|
/* NetHack 3.6 tilemap.c $NHDT-Date: 1589064692 2020/05/09 22:51:32 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.46 $ */
|
||||||
/* Copyright (c) 2016 by Michael Allison */
|
/* Copyright (c) 2016 by Michael Allison */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
#include "objclass.h"
|
#include "objclass.h"
|
||||||
#include "rm.h"
|
#include "rm.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
extern int FDECL(def_char_to_objclass, (CHAR_P));
|
|
||||||
|
|
||||||
#define Fprintf (void) fprintf
|
#define Fprintf (void) fprintf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user