Skip to content

Commit 0767172

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b65a8d commit 0767172

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compat/mingw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)
21622162
return -1;
21632163
}
21642164

2165-
static void setup_windows_environment()
2165+
static void setup_windows_environment(void)
21662166
{
21672167
char *tmp = getenv("TMPDIR");
21682168

@@ -2204,7 +2204,7 @@ typedef struct {
22042204
extern int __wgetmainargs(int *argc, wchar_t ***argv, wchar_t ***env, int glob,
22052205
_startupinfo *si);
22062206

2207-
static NORETURN void die_startup()
2207+
static NORETURN void die_startup(void)
22082208
{
22092209
fputs("fatal: not enough memory for initialization", stderr);
22102210
exit(128);
@@ -2224,7 +2224,7 @@ static char *wcstoutfdup_startup(char *buffer, const wchar_t *wcs, size_t len)
22242224
return memcpy(malloc_startup(len), buffer, len);
22252225
}
22262226

2227-
void mingw_startup()
2227+
void mingw_startup(void)
22282228
{
22292229
int i, maxlen, argc;
22302230
char *buffer;

compat/mingw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,8 @@ extern CRITICAL_SECTION pinfo_cs;
532532
* A replacement of main() that adds win32 specific initialization.
533533
*/
534534

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); \
537537
static int mingw_main(c,v); \
538538
int main(int argc, char **argv) \
539539
{ \

compat/winansi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static inline ioinfo* _pioinfo(int fd)
492492
(fd & (IOINFO_ARRAY_ELTS - 1)) * sizeof_ioinfo);
493493
}
494494

495-
static int init_sizeof_ioinfo()
495+
static int init_sizeof_ioinfo(void)
496496
{
497497
int istty, wastty;
498498
/* don't init twice */

0 commit comments

Comments
 (0)