mingw: let the build succeed with DEVELOPER=1
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>
Johannes Schindelin committed
Jun 18, 2016 at 14:38 UTC
0767172b9068b225c06fd7ce66422e5936ec60a2
3 files changed
+6
-6
compat/mingw.c
+3
-3
@@ -2162,7 +2162,7 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)
2162
return -1;
2163
}
2164
2165
-static void setup_windows_environment()
2165
+static void setup_windows_environment(void)
2166
{
2167
char *tmp = getenv("TMPDIR");
2168
@@ -2204,7 +2204,7 @@ typedef struct {
2204
extern int __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int glob,
2205
_startupinfo *si);
2206
2207
-static NORETURN void die_startup()
2207
+static NORETURN void die_startup(void)
2208
{
2209
fputs("fatal: not enough memory for initialization", stderr);
2210
exit(128);
@@ -2224,7 +2224,7 @@ static char *wcstoutfdup_startup(char *buffer, const wchar_t *wcs, size_t len)
2224
return memcpy(malloc_startup(len), buffer, len);
2225
}
2226
2227
-void mingw_startup()
2227
+void mingw_startup(void)
2228
{
2229
int i, maxlen, argc;
2230
char *buffer;
compat/mingw.h
+2
-2
@@ -532,8 +532,8 @@ extern CRITICAL_SECTION pinfo_cs;
532
* A replacement of main() that adds win32 specific initialization.
533
*/
534
535
-void mingw_startup();
536
-#define main(c,v) dummy_decl_mingw_main(); \
535
+void mingw_startup(void);
536
+#define main(c,v) dummy_decl_mingw_main(void); \
537
static int mingw_main(c,v); \
538
int main(int argc, char **argv) \
539
{ \
compat/winansi.c
+1
-1
@@ -492,7 +492,7 @@ static inline ioinfo* _pioinfo(int fd)
492
(fd & (IOINFO_ARRAY_ELTS - 1)) * sizeof_ioinfo);
493
}
494
495
-static int init_sizeof_ioinfo()
495
+static int init_sizeof_ioinfo(void)
496
{
497
int istty, wastty;
498
/* don't init twice */