[Git][NTPsec/ntpsec][ntpmon-usage-line] 2 commits: ntpfrob: fix multiple warnings about missing prototypes.

Ian Bruene gitlab at mg.gitlab.com
Thu Apr 6 21:32:46 UTC 2017


Ian Bruene pushed to branch ntpmon-usage-line at NTPsec / ntpsec


Commits:
e624af47 by Gary E. Miller at 2017-04-06T14:04:11-07:00
ntpfrob: fix multiple warnings about missing prototypes.

- - - - -
092e8dc3 by Ian Bruene at 2017-04-06T21:32:09+00:00
Fixed ntpmon usage text to include unit display option.

- - - - -


6 changed files:

- ntpclients/ntpmon
- ntpfrob/bumpclock.c
- ntpfrob/jitter.c
- ntpfrob/main.c
- ntpfrob/ntpfrob.h
- ntpfrob/pps-api.c


Changes:

=====================================
ntpclients/ntpmon
=====================================
--- a/ntpclients/ntpmon
+++ b/ntpclients/ntpmon
@@ -161,7 +161,7 @@ class OutputContext:
         curses.endwin()
 
 usage = '''
-USAGE: ntpmon [-V] [host]
+USAGE: ntpmon [-u] [-V] [host]
 '''
 
 if __name__ == '__main__':


=====================================
ntpfrob/bumpclock.c
=====================================
--- a/ntpfrob/bumpclock.c
+++ b/ntpfrob/bumpclock.c
@@ -10,6 +10,9 @@
 #include <string.h>
 #include <time.h>
 
+#include "config.h"
+#include "ntpfrob.h"
+
 #define NS_PER_S	1000000000
 
 void bumpclock(int bump)


=====================================
ntpfrob/jitter.c
=====================================
--- a/ntpfrob/jitter.c
+++ b/ntpfrob/jitter.c
@@ -15,7 +15,6 @@
 #include <stdio.h>
 #include <sys/time.h>
 #include <stdlib.h>
-#include <stdbool.h>
 
 #include "ntpfrob.h"
 


=====================================
ntpfrob/main.c
=====================================
--- a/ntpfrob/main.c
+++ b/ntpfrob/main.c
@@ -10,7 +10,9 @@
 #include "config.h"
 #include "ntpfrob.h"
 
-void usage(void)
+static void usage(void);
+
+static void usage(void)
 {
 	fputs(
 "usage:\n"


=====================================
ntpfrob/ntpfrob.h
=====================================
--- a/ntpfrob/ntpfrob.h
+++ b/ntpfrob/ntpfrob.h
@@ -1,6 +1,9 @@
 /*
  * Our methods, one per linked module
  */
+#include <stdbool.h>      /* for bool */
+#include "ntp_fp.h"       /* for l_fp */
+
 typedef enum {plain_text, raw, json} iomode;
 
 extern void ppscheck(char *device);
@@ -9,5 +12,7 @@ extern void bumpclock(int);
 extern void jitter(const iomode mode);
 extern void stepback(void);
 extern void precision(const iomode mode);
+extern void bumpclock(int bump);
+extern void get_clocktime(l_fp *now);
 
 /*end */


=====================================
ntpfrob/pps-api.c
=====================================
--- a/ntpfrob/pps-api.c
+++ b/ntpfrob/pps-api.c
@@ -19,6 +19,7 @@
 #include <time.h>
 #include <unistd.h>
 #include "timespecops.h"
+#include "ntpfrob.h"
 
 #ifdef HAVE_SYS_TIMEPPS_H
 #include <sys/timepps.h>
@@ -37,8 +38,9 @@
                 }                                                       \
         } while (0)
 
+static void Chew(struct timespec *, struct timespec *, unsigned, unsigned);
 
-void
+static void
 Chew(struct timespec *tsa, struct timespec *tsc, unsigned sa, unsigned sc)
 {
 	struct timespec ts;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fb664f30c45c2f33095093b5cea2844c69f63437...092e8dc3349ebfab2cb81888a3fa04fed9f8990a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170406/6b43e514/attachment.html>


More information about the vc mailing list