From 4ca707ecf48bba25eeeb2c9ab8bf885f2ffae6ab Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 9 May 2020 15:51:38 -0700 Subject: [PATCH] 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. --- include/rm.h | 11 ++++++++++- win/share/tilemap.c | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/rm.h b/include/rm.h index 62d34ed06..e5322b2ee 100644 --- a/include/rm.h +++ b/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) Pasi Kallinen, 2017. */ /* NetHack may be freely redistributed. See license for details. */ @@ -664,4 +664,13 @@ typedef struct { /* restricted movement, potential luck penalties */ #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 */ diff --git a/win/share/tilemap.c b/win/share/tilemap.c index 3819b1bf8..fd889114e 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -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 */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,7 +15,6 @@ #include "objclass.h" #include "rm.h" #include "display.h" -extern int FDECL(def_char_to_objclass, (CHAR_P)); #define Fprintf (void) fprintf