[Git][NTPsec/ntpsec][master] 5 commits: remove two redundant externs

Gary E. Miller gitlab at mg.gitlab.com
Fri Apr 7 20:39:45 UTC 2017


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


Commits:
021aee2e by Gary E. Miller at 2017-04-07T13:20:07-07:00
remove two redundant externs

- - - - -
a4e0404e by Gary E. Miller at 2017-04-07T13:22:03-07:00
remove redundant extern.  Sort list.

- - - - -
f6554a0e by Gary E. Miller at 2017-04-07T13:26:22-07:00
remove two redundant externs.

- - - - -
0493e1de by Gary E. Miller at 2017-04-07T13:27:47-07:00
remove 2 duplicate externs.

- - - - -
fe5dd73f by Gary E. Miller at 2017-04-07T13:38:22-07:00
waf: hide -Wnested-externs, incompatible w/ Unity...

At this instant main ntpd code is clean for this warning.

- - - - -


5 changed files:

- ntpd/ntp_config.c
- ntpd/refclock_local.c
- ntpfrob/ntpfrob.h
- ntptime/ntptime.c
- wafhelpers/configure.py


Changes:

=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -162,7 +162,6 @@ typedef struct peer_resolved_ctx_tag {
 /*
  * Definitions of things either imported from or exported to outside
  */
-extern int yydebug;			/* ntp_parser.c (.y) */
 config_tree cfgt;			/* Parser output stored here */
 struct config_tree_tag *cfg_tree_history;	/* History of configs */
 char	*sys_phone[MAXPHONE] = {NULL};	/* ACTS phone numbers */
@@ -2283,7 +2282,6 @@ config_mdnstries(
 	)
 {
 #if defined(HAVE_DNS_SD_H) && defined(ENABLE_MDNS_REGISTRATION)
-	extern int mdnstries;
 	mdnstries = ptree->mdnstries;
 #else
 	UNUSED_ARG(ptree);


=====================================
ntpd/refclock_local.c
=====================================
--- a/ntpd/refclock_local.c
+++ b/ntpd/refclock_local.c
@@ -58,16 +58,6 @@
 #define DISPERSION	.01	/* default dispersion (10 ms) */
 
 /*
- * Imported from the timer module
- */
-extern u_long current_time;
-
-/*
- * Imported from ntp_proto
- */
-extern int8_t sys_precision;
-
-/*
  * Function prototypes
  */
 static	bool	local_start (int, struct peer *);


=====================================
ntpfrob/ntpfrob.h
=====================================
--- a/ntpfrob/ntpfrob.h
+++ b/ntpfrob/ntpfrob.h
@@ -6,13 +6,12 @@
 
 typedef enum {plain_text, raw, json} iomode;
 
-extern void ppscheck(char *device);
-extern void tickadj(const bool mode, const int tick);
 extern void bumpclock(int);
+extern void get_clocktime(l_fp *now);
 extern void jitter(const iomode mode);
-extern void stepback(void);
+extern void ppscheck(char *device);
 extern void precision(const iomode mode);
-extern void bumpclock(int bump);
-extern void get_clocktime(l_fp *now);
+extern void stepback(void);
+extern void tickadj(const bool mode, const int tick);
 
 /*end */


=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -97,8 +97,6 @@ main(
 	char *argv[]
 	)
 {
-	extern int ntp_optind;
-	extern char *ntp_optarg;
 	struct ntptimeval ntv;
 	struct timeval tv;
 	struct timex ntx, _ntx;


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -297,10 +297,10 @@ def cmd_configure(ctx, config):
             "-Winit-self",
             "-Winline",
             "-Winvalid-pch",
-            "-Wmissing-declarations", # Not Ready For Primt Time
+            "-Wmissing-declarations", # Not Ready For Prime Time
             "-Wmissing-format-attribute",
             "-Wmultichar",
-            "-Wnested-externs",
+            # "-Wnested-externs",     # incompatible w/ Unity...
             "-Wpacked",
             # "-Wpadded",             # duck... over 3k warnings
             "-Wpointer-arith",



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/8e91ef5edc40d3996d766f9cf90fb110f4c95fbb...fe5dd73f1b28c69061c10c36cd1cbf97f785c7cc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170407/433adcf7/attachment.html>


More information about the vc mailing list