mingw: let the build succeed with DEVELOPER=1
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 18 Jun 2016 12:38:36 +0000 (14:38 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jun 2016 19:12:12 +0000 (12:12 -0700)
The recently introduced developer flags identified a couple of
old-style function declarations in the Windows-specific code where
the parameter list was left empty instead of specifying "void"
explicitly. Let's just fix them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c
compat/mingw.h
compat/winansi.c
index a8218e6f0f2177e769cf3841b1c7d7d9b9ed270d..2b5467deadc1162edb134e4f5d95f2b8b5d82368 100644 (file)
@@ -2162,7 +2162,7 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)
        return -1;
 }
 
-static void setup_windows_environment()
+static void setup_windows_environment(void)
 {
        char *tmp = getenv("TMPDIR");
 
@@ -2204,7 +2204,7 @@ typedef struct {
 extern int __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int glob,
                _startupinfo *si);
 
-static NORETURN void die_startup()
+static NORETURN void die_startup(void)
 {
        fputs("fatal: not enough memory for initialization", stderr);
        exit(128);
@@ -2224,7 +2224,7 @@ static char *wcstoutfdup_startup(char *buffer, const wchar_t *wcs, size_t len)
        return memcpy(malloc_startup(len), buffer, len);
 }
 
-void mingw_startup()
+void mingw_startup(void)
 {
        int i, maxlen, argc;
        char *buffer;
index 69bb43dc35d4c28724f007d9684715ec40421542..9a8803b876a1ed38aca34e83c3859e607bdd17e7 100644 (file)
@@ -532,8 +532,8 @@ extern CRITICAL_SECTION pinfo_cs;
  * A replacement of main() that adds win32 specific initialization.
  */
 
-void mingw_startup();
-#define main(c,v) dummy_decl_mingw_main(); \
+void mingw_startup(void);
+#define main(c,v) dummy_decl_mingw_main(void); \
 static int mingw_main(c,v); \
 int main(int argc, char **argv) \
 { \
index 3be60ce1c6fc0b5a6d96fdbe1101ed99e28b3585..db4a5b0a37d687218ab085f22b57eb35e28893b8 100644 (file)
@@ -492,7 +492,7 @@ static inline ioinfo* _pioinfo(int fd)
                        (fd & (IOINFO_ARRAY_ELTS - 1)) * sizeof_ioinfo);
 }
 
-static int init_sizeof_ioinfo()
+static int init_sizeof_ioinfo(void)
 {
        int istty, wastty;
        /* don't init twice */