[Git][NTPsec/ntpsec][master] Fix a few warnings

Hal Murray gitlab at mg.gitlab.com
Fri Apr 14 07:12:52 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
20d23140 by Hal Murray at 2017-04-14T00:10:38-07:00
Fix a few warnings

- - - - -


6 changed files:

- include/ntpd.h
- libntp/pymodule.c
- ntpd/ntp_sandbox.c
- ntpd/ntpd.c
- ntpfrob/ntpfrob.h
- ntpfrob/pps-api.c


Changes:

=====================================
include/ntpd.h
=====================================
--- a/include/ntpd.h
+++ b/include/ntpd.h
@@ -247,7 +247,7 @@ extern l_fp	fetch_packetstamp(struct recvbuf *, struct msghdr *, l_fp);
  */
 
 /* ntp_config.c */
-extern char *	progname;
+extern const char *progname;
 extern char	*sys_phone[];		/* ACTS phone numbers */
 extern char *ntp_signd_socket;
 extern struct config_tree_tag *cfg_tree_history;


=====================================
libntp/pymodule.c
=====================================
--- a/libntp/pymodule.c
+++ b/libntp/pymodule.c
@@ -25,7 +25,7 @@
 
 #include "python_compatibility.h"
 
-char *progname = "libntpc";
+const char *progname = "libntpc";
 
 /*
  * Client utility functions


=====================================
ntpd/ntp_sandbox.c
=====================================
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -229,7 +229,7 @@ getgroup:
 			 *  interface tracking.
 			 */
 			cap_t caps;
-			char *captext;
+			const char *captext;
 			
 			captext = want_dynamic_interface_tracking
 				      ? "cap_sys_nice,cap_sys_time,cap_net_bind_service=pe"


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -85,7 +85,7 @@ const char *chrootdir;	/* directory to chroot to */
 int	waitsync_fd_to_close = -1;	/* -w/--wait-sync */
 #endif
 
-char *progname;
+const char *progname;
 
 #ifdef HAVE_NETINFO_NI_H
 extern bool	check_netinfo;


=====================================
ntpfrob/ntpfrob.h
=====================================
--- a/ntpfrob/ntpfrob.h
+++ b/ntpfrob/ntpfrob.h
@@ -9,7 +9,7 @@ typedef enum {plain_text, raw, json} iomode;
 extern void bumpclock(int);
 extern void get_clocktime(l_fp *now);
 extern void jitter(const iomode mode);
-extern void ppscheck(char *device);
+extern void ppscheck(const char *device);
 extern void precision(const iomode mode);
 extern void stepback(void);
 extern void tickadj(const bool mode, const int tick);


=====================================
ntpfrob/pps-api.c
=====================================
--- a/ntpfrob/pps-api.c
+++ b/ntpfrob/pps-api.c
@@ -63,7 +63,7 @@ static int err(int out, const char *legend)
 }
 #endif /* HAVE_SYS_TIMEPPS_H */
 
-void ppscheck(char *device)
+void ppscheck(const char *device)
 {
 #ifndef HAVE_SYS_TIMEPPS_H
 	(void)device;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/20d2314080bc513587374c2a0159c0276a0cdf5b

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/20d2314080bc513587374c2a0159c0276a0cdf5b
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/e47f650d/attachment.html>


More information about the vc mailing list