[Git][NTPsec/ntpsec][master] 3 commits: ntp_io: function too big to inline.

Gary E. Miller gitlab at mg.gitlab.com
Fri Apr 14 04:14:01 UTC 2017


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


Commits:
6751793b by Gary E. Miller at 2017-04-13T21:05:56-07:00
ntp_io: function too big to inline.

- - - - -
c8d0aeb9 by Gary E. Miller at 2017-04-13T21:07:48-07:00
waf: Use -Winline by default if available.

- - - - -
3b798346 by Gary E. Miller at 2017-04-13T21:12:36-07:00
waf: enable -Winit-self and -Wwrite-strings by default if available

- - - - -


2 changed files:

- ntpd/ntp_io.c
- wafhelpers/configure.py


Changes:

=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -254,7 +254,7 @@ static inline int	read_network_packet	(SOCKET, endpt *, l_fp);
 static void ntpd_addremove_io_fd (int, int, int);
 static void input_handler (fd_set *, l_fp *);
 #ifdef REFCLOCK
-static inline int	read_refclock_packet	(SOCKET, struct refclockio *, l_fp);
+static int	read_refclock_packet	(SOCKET, struct refclockio *, l_fp);
 #endif
 
 /*
@@ -2167,8 +2167,10 @@ sendpkt(
  * Routine to read the refclock packets for a specific interface
  * Return the number of bytes read. That way we know if we should
  * read it again or go on to the next one if no bytes returned
+ *
+ * Note: too big to inline
  */
-static inline int
+static int
 read_refclock_packet(
 	SOCKET			fd,
 	struct refclockio *	rp,


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -261,8 +261,10 @@ def cmd_configure(ctx, config):
         ('w_format', '-Wformat'),
         # fails on OpenBSD 6
         ('w_format_signedness', '-Wformat-signedness'),
-        ('w_shadow', '-Wshadow'),
         ('w_init_self', '-Winit-self'),
+        ('w_inline', '-Winline'),
+        ('w_shadow', '-Wshadow'),
+        ('w_write_strings', '-Wwrite-strings'),
         ]
 
     # Check which linker flags are supported
@@ -299,7 +301,6 @@ def cmd_configure(ctx, config):
             "-Wformat-nonliteral",    # needs -Wformat
             "-Wformat-security",      # needs -Wformat
             "-Wimplicit-function-declaration",
-            "-Winline",
             "-Winvalid-pch",
             "-Wmissing-declarations", # Not Ready For Prime Time
             "-Wmissing-format-attribute",
@@ -310,7 +311,6 @@ def cmd_configure(ctx, config):
             "-Wpointer-arith",
             # "-Wredundant-decls",    # incompatible w/ Unity
             "-Wswitch-default",       # warns on Bison bug
-            "-Wwrite-strings",
         ] + ctx.env.CFLAGS
         cc_test_flags += [
             # fails on Solaris and OpenBSD 6
@@ -386,6 +386,10 @@ int main(int argc, char **argv) {
         ctx.env.CFLAGS = ['-Wformat'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_init_self:
         ctx.env.CFLAGS = ['-Winit-self'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_inline:
+        ctx.env.CFLAGS = ['-Winline'] + ctx.env.CFLAGS
+    if ctx.env.HAS_w_write_strings:
+        ctx.env.CFLAGS = ['-Wwrite-strings'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_shadow:
         ctx.env.CFLAGS = ['-Wshadow'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_sign_conversion:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/dae3a2d35e7fd289806780da90b12628be268bfb...3b798346c07c59bb2e2c3fe58515e1cfcf89e158

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/dae3a2d35e7fd289806780da90b12628be268bfb...3b798346c07c59bb2e2c3fe58515e1cfcf89e158
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/20170414/5d2139b4/attachment.html>


More information about the vc mailing list