[Git][NTPsec/ntpsec][master] 4 commits: waf: check for undefined preprocessor symbols being used.
Gary E. Miller
gitlab at mg.gitlab.com
Sun Apr 2 04:32:54 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
8320da5c by Gary E. Miller at 2017-04-01T21:16:57-07:00
waf: check for undefined preprocessor symbols being used.
And fix the one it found.
- - - - -
35a1d3d4 by Gary E. Miller at 2017-04-01T21:22:20-07:00
Add -Wshadow option. Fix the shadow it found.
- - - - -
66566ae7 by Gary E. Miller at 2017-04-01T21:28:22-07:00
Add, but comment out, check for missing prototype.
Looks like there are a lot to fix.
- - - - -
13bfb385 by Gary E. Miller at 2017-04-01T21:30:15-07:00
A check for missing declarations, commented out.
There are a ton to fix.
- - - - -
3 changed files:
- ntpd/refclock_oncore.c
- ntpfrob/tickadj.c
- wafhelpers/configure.py
Changes:
=====================================
ntpd/refclock_oncore.c
=====================================
--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -2670,7 +2670,7 @@ oncore_msg_CaFaIa(
instance->timeout = 0;
-#if ONCORE_VERBOSE_SELF_TEST
+#ifdef ONCORE_VERBOSE_SELF_TEST
if (debug > 2) {
if (buf[2] == 'I')
oncore_log_f(instance, LOG_DEBUG,
=====================================
ntpfrob/tickadj.c
=====================================
--- a/ntpfrob/tickadj.c
+++ b/ntpfrob/tickadj.c
@@ -27,10 +27,10 @@
static struct timex txc;
#endif /* HAVE_ADJTIMEX */
-void tickadj(const bool json, const int newtick)
+void tickadj(const bool json_b, const int newtick)
{
#ifndef HAVE_ADJTIMEX
- UNUSED_ARG(json);
+ UNUSED_ARG(json_b);
UNUSED_ARG(newtick);
fputs("ntpfrob: \n", stderr);
exit(1);
@@ -76,14 +76,14 @@ void tickadj(const bool json, const int newtick)
else
{
#ifdef HAVE_STRUCT_TIMEX_TIME_TICK
- if (json)
+ if (json_b)
printf("{\"tick\":%ld,\"tick_adj\":%ld}\n",
txc.time_tick, txc.tickadj);
else
printf("tick = %ld\ntick_adj = %ld\n",
txc.time_tick, txc.tickadj);
#else
- if (json)
+ if (json_b)
printf("{\"tick\":%ld}\n", txc.tick);
else
printf("tick = %ld\n", txc.tick);
=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -276,8 +276,13 @@ def cmd_configure(ctx, config):
"-O1",
"-Wall",
"-Wextra",
- # "-Wsign-conversion", # debug only
+ # "-Wfloat-equal", # Not Ready For Prime Time
+ # "-Wmissing-prototypes", # Not Ready For Prime Time
+ # "-Wmissing-declarations", # Not Ready For Primt Time
+ # "-Wsign-conversion", # Not Ready For Prime Time
+ "-Wshadow",
"-Wstrict-prototypes",
+ "-Wundef",
"-Wunused",
]
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/de70384caef3346e0db6e8683b3ff181f01f81b7...13bfb385d996af5ae2d193ba38ca555878c4ef1e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170402/8c747ab8/attachment.html>
More information about the vc
mailing list