Skip to content

Commit 1414918

Browse files
peffgitster
authored andcommitted
compat: disable -Wunused-parameter in win32/headless.c
As with the files touched in the previous commit, win32/headless.c does not include git-compat-util.h, so it doesn't have our UNUSED macro. Unlike those ones, this is not third-party code, so it would not be a big deal to modify it. However, I'm not sure if including git-compat-util.h would create other headaches (and I don't even have a machine to test this on; I'm relying on Windows CI to compile it at all). Given how trivial the file is, and that the unused parameters are not interesting (they are just boilerplate for the wWinMain() function), we can just use the same trick as the previous commit and disable the warnings via pragma. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4550c16 commit 1414918

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/win32/headless.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <stdlib.h>
1212
#include <wchar.h>
1313

14+
#pragma GCC diagnostic ignored "-Wunused-parameter"
15+
1416
/*
1517
* If `dir` contains the path to a Git exec directory, extend `PATH` to
1618
* include the corresponding `bin/` directory (which is where all those

0 commit comments

Comments
 (0)