function pointer assignment warnings in VC2005

The latest Micrsoft compilers complain when a function is
assigned to a function pointer, and the function's argument
list does not match the prototype precisely.
It was evem complaining about the difference between this:
     int x()
     {
        [...]
     }
and a prototype of
     int x(void);
when assigning that function's address to a function pointer.

This quiets those warnings, without suppressing the mismatch
check altogether for more serious mismatches.
This commit is contained in:
nethack.allison
2006-06-25 19:54:31 +00:00
parent c374583632
commit d09c374239
11 changed files with 109 additions and 91 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)dlb.c 3.5 1997/07/29 */
/* SCCS Id: @(#)dlb.c 3.5 2006/06/25 */
/* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */
/* NetHack may be freely redistributed. See license for details. */
@@ -237,7 +237,7 @@ close_library(lp)
* keep track of the file position.
*/
STATIC_OVL boolean
lib_dlb_init()
lib_dlb_init(VOID_ARGS)
{
/* zero out array */
(void) memset((char *)&dlb_libs[0], 0, sizeof(dlb_libs));
@@ -254,7 +254,7 @@ lib_dlb_init()
}
STATIC_OVL void
lib_dlb_cleanup()
lib_dlb_cleanup(VOID_ARGS)
{
int i;