USE_OLDARGS update (1 of 2)
Files modified:
include/tradstdc.h, sp_lev.h, system.h
util/lev_main.c
Silence a bunch of warnings generated by recent gcc which weren't there
with whatever version I had when 3.6.0 was being readied for release.
For lev_main, there were two basic types: not enough arguments in calls
to lc_pline, lc_warning, and lc_error (since we weren't passing dummy
arguments as is done for add_opvars), and conversion from 'int' or
narrower to 'char *' (from -Wint-to-pointer-cast, which either wasn't
there yet in the older gcc, or wasn't included in -Wall back then).
[Note that for any configuration decrepit enough to actually need
USE_OLDARGS, such conversions will either work fine or else nethack
simply won't be viable.]
src/pline.c generates a bunch of warnings (for USE_OLDARGS). The fix
for that will be (2 of 2).
To test, instead of mucking about with CFLAGS or sys/unix/hints, I've
been temporarily adding unconditional
|#undef USE_STDARG
|#undef USE_VARARGS
|#define USE_OLDARGS
to the end of config1.h and then doing my normal build--which is why
-Wall (or possibly -W) is drawing -Wint-to-pointer-cast warnings.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 system.h $NHDT-Date: 1449269772 2015/12/04 22:56:12 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $ */
|
||||
/* NetHack 3.6 system.h $NHDT-Date: 1501723401 2017/08/03 01:23:21 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.13 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -489,8 +489,17 @@ E int FDECL(vprintf, (const char *, va_list));
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef vprintf
|
||||
#undef vprintf
|
||||
#endif
|
||||
#define vprintf printf
|
||||
#ifdef vfprintf
|
||||
#undef vfprintf
|
||||
#endif
|
||||
#define vfprintf fprintf
|
||||
#ifdef vsprintf
|
||||
#undef vsprintf
|
||||
#endif
|
||||
#define vsprintf sprintf
|
||||
#endif
|
||||
#endif /* NEED_VARARGS */
|
||||
|
||||
Reference in New Issue
Block a user