diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2021-03-10 08:43:56 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-10 17:35:18 -0700 |
commit | 88bc64366e939f916a02e8ac5c341c8df766bac4 (patch) | |
tree | 6f0cb88ccfe72cf08820b11b7232f696ac3b3b67 /src/wg.c | |
parent | Makefile: fix version indicator (diff) | |
download | wireguard-tools-88bc64366e939f916a02e8ac5c341c8df766bac4.tar.xz wireguard-tools-88bc64366e939f916a02e8ac5c341c8df766bac4.zip |
wireguard-tools: const correctness
Fixes much of the noise from a FreeBSD WARNS=6 build of wg(8)
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to '')
-rw-r--r-- | src/wg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,7 +14,7 @@ const char *PROG_NAME; static const struct { const char *subcommand; - int (*function)(int, char**); + int (*function)(int, const char**); const char *description; } subcommands[] = { { "show", show_main, "Shows the current configuration and device information" }, @@ -37,7 +37,7 @@ static void show_usage(FILE *file) fprintf(file, "You may pass `--help' to any of these subcommands to view usage.\n"); } -int main(int argc, char *argv[]) +int main(int argc, const char *argv[]) { PROG_NAME = argv[0]; @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) } if (argc == 1) { - static char *new_argv[] = { "show", NULL }; + static const char *new_argv[] = { "show", NULL }; return show_main(1, new_argv); } |