summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2019-02-09 21:00:03 +0000
committerSami Kerola <kerolasa@iki.fi>2019-02-09 21:00:03 +0000
commit0cce403f478bd0a4a60d0b8566c67d3a72498008 (patch)
treef261af8b0d5bced1f78f33bf677b8bda4e8b5c12
parent0eb882abf25f00ab85ae71dd48ef931c68bf068b (diff)
hello: fix couple compiler warnings
* parse_options: add static keyword to avoid need for prototype. * break: remove code that is never executed.
-rw-r--r--src/hello.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hello.c b/src/hello.c
index 1791133..2e7d38e 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -79,7 +79,7 @@ print_help (FILE *restrict out)
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
-void
+static void
parse_options (int argc, char *argv[], const char **greeting_msg)
{
int optc;
@@ -103,7 +103,6 @@ parse_options (int argc, char *argv[], const char **greeting_msg)
case OPT_VERSION:
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, PACKAGE_VERSION, AUTHORS, (char *) NULL);
exit (EXIT_SUCCESS);
- break;
case 'g':
*greeting_msg = optarg;
break;