[Git][NTPsec/ntpsec][master] 3 commits: Add 2 missing statics found by clang

Gary E. Miller gitlab at mg.gitlab.com
Wed Feb 15 22:56:34 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
d38b6095 by Gary E. Miller at 2017-02-15T14:07:48-08:00
Add 2 missing statics found by clang

sst is used elsewhere as a global for something else...

- - - - -
3ed0868d by Gary E. Miller at 2017-02-15T14:13:37-08:00
Add 2 missing externs found by clang.

- - - - -
d9be7095 by Gary E. Miller at 2017-02-15T14:13:59-08:00
Comment unreachable found by clang

- - - - -


4 changed files:

- include/ntp_config.h
- ntpd/keyword-gen.c
- ntpd/ntp_scanner.h
- ntpd/ntpd.c


Changes:

=====================================
include/ntp_config.h
=====================================
--- a/include/ntp_config.h
+++ b/include/ntp_config.h
@@ -226,6 +226,7 @@ struct config_tree_tag {
 	sim_fifo *	sim_details;
 	int		mdnstries;
 };
+extern int mdnstries;
 
 
 /* Structure for holding a remote configuration command */


=====================================
ntpd/keyword-gen.c
=====================================
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -220,8 +220,8 @@ typedef struct big_scan_state_tag {
 #define MAX_TOK_LEN	63
 
 const char *	current_keyword;/* for error reporting */
-big_scan_state	sst[MAXSTATES];	/* scanner FSM state entries */
-u_short		sst_highwater;	/* next entry index to consider */
+static big_scan_state	sst[MAXSTATES];	/* scanner FSM state entries */
+static u_short		sst_highwater;	/* next entry index to consider */
 char *		symb[1024];	/* map token ID to symbolic name */
 
 /* for libntp */


=====================================
ntpd/ntp_scanner.h
=====================================
--- a/ntpd/ntp_scanner.h
+++ b/ntpd/ntp_scanner.h
@@ -140,5 +140,6 @@ extern bool lex_pop_file(void);
 extern size_t      lex_level(void);
 extern bool lex_from_file(void);
 extern struct FILE_INFO * lex_current(void);
+extern const char * const keyword_text[];
 
 #endif	/* GUARD_NTP_SCANNER_H */


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -835,6 +835,7 @@ ntpdmain(
 #endif
 	
 	mainloop();
+        /* unreachable, mainloop() never returns */
 	return 1;
 }
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/18b6689d83652397f940899e1ef699e08ecb689e...d9be7095c65d386c636d09cf54f63c1526e61893
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170215/ab4f60dc/attachment.html>


More information about the vc mailing list