[Git][NTPsec/ntpsec][master] 4 commits: remove a silly header file that was causing duplicate externs.
Gary E. Miller
gitlab at mg.gitlab.com
Fri Apr 7 21:31:09 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
1e5dfa26 by Gary E. Miller at 2017-04-07T14:02:11-07:00
remove a silly header file that was causing duplicate externs.
- - - - -
c24ee820 by Gary E. Miller at 2017-04-07T14:23:27-07:00
Remove redundant prototypes, change to statics.
- - - - -
f5ebf2a6 by Gary E. Miller at 2017-04-07T14:29:10-07:00
remove redundant prototype.
The #ifndef did nothing...
- - - - -
673569cf by Gary E. Miller at 2017-04-07T14:29:56-07:00
remove -Wredundant-decls, incompatble w/ Unity.
All redundants in main code removed.
- - - - -
11 changed files:
- attic/sht.c
- include/ntp.h
- − include/ntp_random.h
- libntp/ntp_random.c
- libntp/pymodule.c
- libntp/systime.c
- ntpd/ntp_config.c
- ntpd/ntp_peer.c
- ntpd/ntpd.c
- ntpd/refclock_generic.c
- wafhelpers/configure.py
Changes:
=====================================
attic/sht.c
=====================================
--- a/attic/sht.c
+++ b/attic/sht.c
@@ -14,7 +14,6 @@
#include <assert.h>
#include "ntp_stdlib.h"
-#include "ntp_random.h"
char *progname;
=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -27,9 +27,10 @@ typedef unsigned int u_int;
#include "ntp_types.h"
#include "ntp_lists.h"
#include "ntp_stdlib.h"
-#include "ntp_random.h"
#include "ntp_net.h"
+extern int32_t ntp_random (void);
+
/*
* Calendar arithmetic - contributed by G. Healton
*/
=====================================
include/ntp_random.h deleted
=====================================
--- a/include/ntp_random.h
+++ /dev/null
@@ -1 +0,0 @@
-int32_t ntp_random (void);
=====================================
libntp/ntp_random.c
=====================================
--- a/libntp/ntp_random.c
+++ b/libntp/ntp_random.c
@@ -9,8 +9,9 @@
#include <openssl/rand.h>
+#include "config.h"
+#include "ntp.h"
#include "ntp_endian.h"
-#include "ntp_random.h"
int32_t
ntp_random(void)
=====================================
libntp/pymodule.c
=====================================
--- a/libntp/pymodule.c
+++ b/libntp/pymodule.c
@@ -13,7 +13,6 @@
#include "ntp_io.h"
#include "ntp_fp.h"
#include "ntp_stdlib.h"
-#include "ntp_random.h"
#include "ntp_syslog.h"
#include "timespecops.h"
=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -9,7 +9,6 @@
#include "ntp.h"
#include "ntp_syslog.h"
#include "ntp_stdlib.h"
-#include "ntp_random.h"
#include "timespecops.h"
#include "ntp_calendar.h"
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -32,7 +32,7 @@
#include "ntp_stdlib.h"
#include "lib_strbuf.h"
#include "ntp_assert.h"
-#include "ntp_random.h"
+
/*
* [Bug 467]: Some linux headers collide with CONFIG_PHONE and CONFIG_KEYS
* so #include these later.
@@ -41,11 +41,6 @@
#include "ntp_scanner.h"
#include "ntp_parser.tab.h"
-/* Bug is Bison 2.5 */
-#ifndef yyparse
- int yyparse (void);
-#endif
-
/* NetInfo configuration locations */
#ifdef HAVE_NETINFO_NI_H
#define NETINFO_CONFIG_DIR "/config/ntp"
=====================================
ntpd/ntp_peer.c
=====================================
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -9,7 +9,6 @@
#include "ntpd.h"
#include "ntp_lists.h"
#include "ntp_stdlib.h"
-#include "ntp_random.h"
/*
* Table of valid association combinations
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -8,7 +8,6 @@
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_stdlib.h"
-#include "ntp_random.h"
#include "ntp_config.h"
#include "ntp_syslog.h"
=====================================
ntpd/refclock_generic.c
=====================================
--- a/ntpd/refclock_generic.c
+++ b/ntpd/refclock_generic.c
@@ -4499,11 +4499,11 @@ struct txbuf
uint8_t *txt; /* pointer to actual data buffer */
};
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
+static void sendcmd (struct txbuf *buf, int c);
+static void sendbyte (struct txbuf *buf, int b);
+static void sendetx (struct txbuf *buf, struct parseunit *parse);
+static void sendint (struct txbuf *buf, int a);
+static void sendflt (struct txbuf *buf, double a);
void
sendcmd(
@@ -4516,12 +4516,6 @@ sendcmd(
buf->idx = 2;
}
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
void
sendbyte(
struct txbuf *buf,
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -304,7 +304,7 @@ def cmd_configure(ctx, config):
"-Wpacked",
# "-Wpadded", # duck... over 3k warnings
"-Wpointer-arith",
- "-Wredundant-decls",
+ # "-Wredundant-decls", # incompatible w/ Unity
"-Wshadow",
"-Wsign-conversion", # fails on Solaris and OpenBSD 6
"-Wsuggest-attribute=noreturn",
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fe5dd73f1b28c69061c10c36cd1cbf97f785c7cc...673569cfb3c167b7db84127738431fe1df1c79f4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170407/b6b54513/attachment.html>
More information about the vc
mailing list