[Git][NTPsec/ntpsec][master] 9 commits: remove -Waggregate-return from debug.

Gary E. Miller gitlab at mg.gitlab.com
Wed Apr 12 21:26:11 UTC 2017


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


Commits:
320214cc by Gary E. Miller at 2017-04-12T13:40:42-07:00
remove -Waggregate-return from debug.

ldiv(), ntpcal_split_yeardays(), ntpcal_daysplit(),
ntpcal_split_eradays(), and more return aggregates.

- - - - -
8e656b81 by Gary E. Miller at 2017-04-12T13:44:33-07:00
ieee754io: fix 2 implicit casts.

- - - - -
0f40d4f2 by Gary E. Miller at 2017-04-12T13:48:48-07:00
clk_dcf7000: make 2 implicit casts explicit.

- - - - -
0acfd4a3 by Gary E. Miller at 2017-04-12T13:50:02-07:00
clk_hopf6021: change 2 implicit casts to explicit.

- - - - -
bf6f1140 by Gary E. Miller at 2017-04-12T13:57:31-07:00
clk_meinberg: change 4 implicit casts to explicit.

- - - - -
158f4884 by Gary E. Miller at 2017-04-12T14:06:37-07:00
Change several implicit casts to explicit.

- - - - -
0997771f by Gary E. Miller at 2017-04-12T14:13:31-07:00
libparse: fix several implicit sign changes.

- - - - -
e875e470 by Gary E. Miller at 2017-04-12T14:23:47-07:00
pymodule: don't cast Bool to int.  Be explicit.

- - - - -
dfdf63a6 by Gary E. Miller at 2017-04-12T14:25:31-07:00
libparse: change implicit sign channge to explicit.

- - - - -


14 changed files:

- libntp/pymodule.c
- libparse/clk_dcf7000.c
- libparse/clk_hopf6021.c
- libparse/clk_meinberg.c
- libparse/clk_rawdcf.c
- libparse/clk_rcc8000.c
- libparse/clk_schmid.c
- libparse/clk_sel240x.c
- libparse/clk_trimtaip.c
- libparse/clk_varitext.c
- libparse/clk_wharton.c
- libparse/ieee754io.c
- libparse/parse.c
- wafhelpers/configure.py


Changes:

=====================================
libntp/pymodule.c
=====================================
--- a/libntp/pymodule.c
+++ b/libntp/pymodule.c
@@ -121,7 +121,7 @@ ntpc_adj_systime(PyObject *self, PyObject *args)
     UNUSED_ARG(self);
     if (!PyArg_ParseTuple(args, "d", &adjustment))
 	return NULL;
-    return Py_BuildValue("d", (int)adj_systime(adjustment, adjtime));
+    return Py_BuildValue("d", adj_systime(adjustment, adjtime) ? 1 : 0);
 }
 
 static PyObject *


=====================================
libparse/clk_dcf7000.c
=====================================
--- a/libparse/clk_dcf7000.c
+++ b/libparse/clk_dcf7000.c
@@ -122,7 +122,8 @@ inp_dcf7000(
 {
 	unsigned int rtc;
 
-	parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_dcf7000(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch (ch)
 	{


=====================================
libparse/clk_hopf6021.c
=====================================
--- a/libparse/clk_hopf6021.c
+++ b/libparse/clk_hopf6021.c
@@ -219,7 +219,8 @@ inp_hopf6021(
 {
 	unsigned int rtc;
 
-	parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_hopf6021(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch (ch)
 	{


=====================================
libparse/clk_meinberg.c
=====================================
--- a/libparse/clk_meinberg.c
+++ b/libparse/clk_meinberg.c
@@ -398,7 +398,8 @@ mbg_input(
 {
 	unsigned int rtc;
 
-	parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("mbg_input(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch (ch)
 	{
@@ -566,7 +567,8 @@ gps_input(
 
   msg_buf = (struct msg_buf *)parseio->parse_pdata;
 
-  parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+  parseprintf(DD_PARSE, ("gps_input(0x%lx, 0x%x, ...)\n",
+              (unsigned long)parseio, (unsigned)ch));
 
   if (!msg_buf)
     return PARSE_INP_SKIP;


=====================================
libparse/clk_rawdcf.c
=====================================
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -364,7 +364,8 @@ cvt_rawdcf(
 		cutoff = 4;	/* doesn't really matter - it'll fail anyway, but gives error output */
 	}
 
-	parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: average bit count: %d\n", cutoff));
+	parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: average bit count: %u\n",
+                    cutoff));
 
 	lowmax = 0;
 	highmax = 0;
@@ -426,7 +427,9 @@ cvt_rawdcf(
 
 	cutoff = (cutoff + span) / 2;
 
-	parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: lower maximum %d, higher maximum %d, cutoff %d\n", lowmax, highmax, cutoff));
+	parseprintf(DD_RAWDCF, ("parse: cvt_rawdcf: "
+                    "lower maximum %u, higher maximum %u, cutoff %u\n",
+                    lowmax, highmax, cutoff));
 
 	s = (unsigned char *)buffer;
 	while (s < e)
@@ -583,7 +586,7 @@ inp_rawdcf(
 	static struct timespec timeout = { 1, (NS_PER_S/2) };
 
 	parseprintf(DD_PARSE, ("inp_rawdcf(0x%lx, 0x%x, ...)\n",
-                    (long)parseio, ch));
+                    (unsigned long)parseio, (unsigned)ch));
 
 	parseio->parse_dtime.parse_stime = *tstamp; /* collect timestamp */
 


=====================================
libparse/clk_rcc8000.c
=====================================
--- a/libparse/clk_rcc8000.c
+++ b/libparse/clk_rcc8000.c
@@ -133,7 +133,8 @@ inp_rcc8000(
 {
 	unsigned int rtc;
 
-	parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_rcc8000(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch (ch)
 	{


=====================================
libparse/clk_schmid.c
=====================================
--- a/libparse/clk_schmid.c
+++ b/libparse/clk_schmid.c
@@ -175,7 +175,8 @@ inp_schmid(
 
 	UNUSED_ARG(tstamp);
 
-	parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch ((uint8_t)ch)
 	{


=====================================
libparse/clk_sel240x.c
=====================================
--- a/libparse/clk_sel240x.c
+++ b/libparse/clk_sel240x.c
@@ -85,8 +85,8 @@ inp_sel240x( parse_t      *parseio,
 {
 	unsigned long rc;
 
-	parseprintf( DD_PARSE,
-	             ("inp_sel240x(0x%lx, 0x%x, ...)\n",(long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_sel240x(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch( ch )
 	{


=====================================
libparse/clk_trimtaip.c
=====================================
--- a/libparse/clk_trimtaip.c
+++ b/libparse/clk_trimtaip.c
@@ -118,7 +118,8 @@ inp_trimtaip(
 {
 	unsigned int rtc;
 
-	parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_trimtaip(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 
 	switch (ch)
 	{


=====================================
libparse/clk_varitext.c
=====================================
--- a/libparse/clk_varitext.c
+++ b/libparse/clk_varitext.c
@@ -160,7 +160,8 @@ inp_varitext(
   struct varitext *t = (struct varitext *)parseio->parse_pdata;
   int    rtc;
 
-  parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+  parseprintf(DD_PARSE, ("inp_varitext(0x%lx, 0x%x, ...)\n",
+              (unsigned long)parseio, (unsigned)ch));
 
   if (!t)
     return PARSE_INP_SKIP;	/* local data not allocated - sigh! */


=====================================
libparse/clk_wharton.c
=====================================
--- a/libparse/clk_wharton.c
+++ b/libparse/clk_wharton.c
@@ -122,7 +122,8 @@ inp_wharton_400a(
 {
 	unsigned int rtc;
 	
-	parseprintf(DD_PARSE, ("inp_wharton_400a(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
+	parseprintf(DD_PARSE, ("inp_wharton_400a(0x%lx, 0x%x, ...)\n",
+                    (unsigned long)parseio, (unsigned)ch));
 	
 	switch (ch)
 	{


=====================================
libparse/ieee754io.c
=====================================
--- a/libparse/ieee754io.c
+++ b/libparse/ieee754io.c
@@ -152,7 +152,7 @@ fetch_ieee754(
         maxexp = 2047;
         characteristic <<= 4;
         /* grab lower characteristic bits */
-        characteristic  |= (val & 0xF0U) >> 4;
+        characteristic  |= (val & 0xF0) >> 4;
 
         mantissa  = (val & 0x0FULL) << 48;
         mantissa |= get_byte(bufp, offsets, &fieldindex) << 40;
@@ -172,7 +172,7 @@ fetch_ieee754(
         maxexp = 255;
         characteristic <<= 1;
         /* grab last characteristic bit from 2nd byte */
-        characteristic |= (val & 0x80) ? 1U : 0 ;
+        characteristic |= (val & 0x80) ? 1 : 0 ;
 
         mantissa   = (val & 0x7FU) << 16;
         mantissa  |= get_byte(bufp, offsets, &fieldindex) << 8;


=====================================
libparse/parse.c
=====================================
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -134,7 +134,9 @@ parse_addchar(
 		/*
 		 * collect into buffer
 		 */
-		parseprintf(DD_PARSE, ("parse: parse_addchar: buffer[%d] = 0x%x\n", parseio->parse_index, ch));
+		parseprintf(DD_PARSE,
+                            ("parse: parse_addchar: buffer[%d] = 0x%x\n",
+                             parseio->parse_index, (unsigned)ch));
 		parseio->parse_data[parseio->parse_index++] = (char)ch;
 		return PARSE_INP_SKIP;
 	}
@@ -196,7 +198,8 @@ parse_ioread(
 		break;
 	}
 
-	parseprintf(DD_PARSE, ("parse_ioread(0x%lx, char=0x%x, ..., ...)\n", (unsigned long)parseio, ch & 0xFF));
+	parseprintf(DD_PARSE, ("parse_ioread(0x%lx, char=0x%x, ..., ...)\n",
+                    (unsigned long)parseio, (unsigned)(ch & 0xFF)));
 
 	if (!clockformats[parseio->parse_lformat]->convert)
 	{
@@ -482,7 +485,7 @@ updatetimeinfo(
 		parseio->parse_dtime.parse_state = parseio->parse_lstate;
 
 	parseprintf(DD_PARSE, ("updatetimeinfo status=0x%lx, time=%x\n",
-			       (long)parseio->parse_dtime.parse_state,
+			       (unsigned long)parseio->parse_dtime.parse_state,
 	                       lfpuint(parseio->parse_dtime.parse_time)));
 
 	return CVT_OK;		/* everything fine and dandy... */


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -283,7 +283,7 @@ def cmd_configure(ctx, config):
         ctx.env.CFLAGS += [
             # "-Wall",                # for masochists
             #"-Wsuggest-attribute=const", # fails build
-            "-Waggregate-return",
+            #"-Waggregate-return",    # breaks ldiv(), ntpcal_daysplit(),  etc.
             "-Wbad-function-cast",
             "-Wcast-align",
             "-Wcast-qual",



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/243e271a062345f292815b2b6b74e3a14a06016b...dfdf63a6f01aa67481c251e7c4cdde2e7d28b62d

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/243e271a062345f292815b2b6b74e3a14a06016b...dfdf63a6f01aa67481c251e7c4cdde2e7d28b62d
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170412/cdad7183/attachment.html>


More information about the vc mailing list