diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-07-01 15:01:28 +0200 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-07-01 15:24:34 +0200 |
commit | 5c54dff5c54e68a1101d8fe37aefc6158fddd7f2 (patch) | |
tree | 61f7e0b35f45ef3408101fc78d659a62c95882ca | |
parent | b764cdf9bfd2e1ab61aee3c0a7b1ee63b4134a5d (diff) | |
download | git-5c54dff5c54e68a1101d8fe37aefc6158fddd7f2.tar.gz |
mingw: Declare main()'s argv as const
In 84d32bf (sparse: Fix mingw_main() argument number/type errors,
2013-04-27), we addressed problems identified by the 'sparse' tool where
argv was declared inconsistently. The way we addressed it was by casting
from the non-const version to the const-version.
This patch is long overdue, fixing compat/mingw.h's declaration to make
the "argv" parameter const.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r-- | compat/mingw.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 9a8803b876..233933ee86 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -535,7 +535,7 @@ extern CRITICAL_SECTION pinfo_cs; 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) \ +int main(int argc, const char **argv) \ { \ mingw_startup(); \ return mingw_main(__argc, (void *)__argv); \ |