Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:0cce403f478bd0a4a60d0b8566c67d3a72498008
Author...:Sami Kerola
Committer:Sami Kerola
Date.....:Sat Feb 9 21:00:03 2019 +0000
Parents..:0eb882abf25f00ab85ae71dd48ef931c68bf068b

Message
hello: fix couple compiler warnings

* parse_options: add static keyword to avoid need for prototype.
* break: remove code that is never executed.

Changes
diff --git a/src/hello.c b/src/hello.c
line changes: +1/-2
index 1791133..2e7d38e
--- 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;

This website is licensed under AGPL-3.0. Feel free to copy!