]> granicus.if.org Git - nethack/commit
sp_lev.c warnings
authorPatR <rankin@nethack.org>
Tue, 13 Oct 2015 22:15:06 +0000 (15:15 -0700)
committerPatR <rankin@nethack.org>
Tue, 13 Oct 2015 22:15:06 +0000 (15:15 -0700)
commit587279601d8dd19e2fd18166b181f70fcf9b7016
treef41d02ca5a033b353e193b942877b9cd73a39c11
parent7451e6c3b09fa064a4dc0196a0c534ec8827a92f
sp_lev.c warnings

Fix a couple of warnings about prototype not matching function definition.
Prototype specified a narrow scalar ('boolean') but function uses old-style
definition which implicitly promotes narrow types (char,short,'boolean' to
int, float to double).  Switch prototypes to BOOLEAN_P.

A whole bunch of prototypes specify STATIC_DCL ('static') and then leave
the definition without STATIC_OVL (also 'static').  I only fixed up a
couple of those, but we risk getting somebody using an old compiler that
doesn't like
  static int foo();
  int foo() { return 42; }
Even if every comiler accepts that (I don't recall whether that was kosher
in the ancient K&R days), you can't tell by looking at the function
defintion (in the usual case where the forward declarations are at the top
of the file rather than immediately before the defintiion) whether it's
local to that file or global, so the missing STATIC_OVL qualifiers ought
to be added.
src/sp_lev.c