* [PATCH] mingw: let the build succeed with DEVELOPER=1
@ 2016-06-18 12:38 Johannes Schindelin
2016-06-20 19:11 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2016-06-18 12:38 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
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>
---
This came up when working on the rebase--helper changes.
Published-As: https://github.com/dscho/git/releases/tag/mingw-dev-flags-v1
compat/mingw.c | 6 +++---
compat/mingw.h | 4 ++--
compat/winansi.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compat/mingw.c b/compat/mingw.c
index a8218e6..2b5467d 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -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;
diff --git a/compat/mingw.h b/compat/mingw.h
index 69bb43d..9a8803b 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -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) \
{ \
diff --git a/compat/winansi.c b/compat/winansi.c
index 3be60ce..db4a5b0 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -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 */
--
2.9.0.119.gb7b8d21
base-commit: 05219a1276341e72d8082d76b7f5ed394b7437a4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mingw: let the build succeed with DEVELOPER=1
2016-06-18 12:38 [PATCH] mingw: let the build succeed with DEVELOPER=1 Johannes Schindelin
@ 2016-06-20 19:11 ` Junio C Hamano
2016-06-21 12:02 ` Johannes Schindelin
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2016-06-20 19:11 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 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.
Thanks. It's about time for them to be cleaned up.
Will queue.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>
> This came up when working on the rebase--helper changes.
>
> Published-As: https://github.com/dscho/git/releases/tag/mingw-dev-flags-v1
> compat/mingw.c | 6 +++---
> compat/mingw.h | 4 ++--
> compat/winansi.c | 2 +-
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/compat/mingw.c b/compat/mingw.c
> index a8218e6..2b5467d 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -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;
> diff --git a/compat/mingw.h b/compat/mingw.h
> index 69bb43d..9a8803b 100644
> --- a/compat/mingw.h
> +++ b/compat/mingw.h
> @@ -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) \
> { \
> diff --git a/compat/winansi.c b/compat/winansi.c
> index 3be60ce..db4a5b0 100644
> --- a/compat/winansi.c
> +++ b/compat/winansi.c
> @@ -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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mingw: let the build succeed with DEVELOPER=1
2016-06-20 19:11 ` Junio C Hamano
@ 2016-06-21 12:02 ` Johannes Schindelin
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2016-06-21 12:02 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi Junio,
On Mon, 20 Jun 2016, Junio C Hamano wrote:
> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
>
> > 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.
>
> Thanks. It's about time for them to be cleaned up.
>
> Will queue.
Thanks!
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-21 12:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 12:38 [PATCH] mingw: let the build succeed with DEVELOPER=1 Johannes Schindelin
2016-06-20 19:11 ` Junio C Hamano
2016-06-21 12:02 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).