[Git][NTPsec/ntpsec][master] ntpfrob: fix multiple warnings about missing prototypes.
Gary E. Miller
gitlab at mg.gitlab.com
Thu Apr 6 21:04:50 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
e624af47 by Gary E. Miller at 2017-04-06T14:04:11-07:00
ntpfrob: fix multiple warnings about missing prototypes.
- - - - -
5 changed files:
- ntpfrob/bumpclock.c
- ntpfrob/jitter.c
- ntpfrob/main.c
- ntpfrob/ntpfrob.h
- ntpfrob/pps-api.c
Changes:
=====================================
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/commit/e624af47cfcf1c31f7eb3355451795feadefb286
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170406/6b715b7d/attachment.html>
More information about the vc
mailing list