[Git][NTPsec/ntpsec][master] 2 commits: Remove sendint - generated unused warning

Hal Murray gitlab at mg.gitlab.com
Sat Apr 8 19:35:39 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
806a1e9d by Hal Murray at 2017-04-08T12:34:01-07:00
Remove sendint - generated unused warning

- - - - -
abc2df91 by Hal Murray at 2017-04-08T12:34:47-07:00
Fix unused parameter warning (when not DEBUG)

- - - - -


2 changed files:

- ntpd/ntp_signd.c
- ntpd/refclock_generic.c


Changes:

=====================================
ntpd/ntp_signd.c
=====================================
--- a/ntpd/ntp_signd.c
+++ b/ntpd/ntp_signd.c
@@ -120,6 +120,9 @@ send_via_ntp_signd(
 	)
 {
 	UNUSED_ARG(flags);
+#ifndef DEBUG
+	UNUSED_ARG(xmode);
+#endif
 	
 	/* We are here because it was detected that the client
 	 * sent an all-zero signature, and we therefore know


=====================================
ntpd/refclock_generic.c
=====================================
--- a/ntpd/refclock_generic.c
+++ b/ntpd/refclock_generic.c
@@ -4466,10 +4466,10 @@ trimbletaip_event(
 #define D2R		PI/180.0
 
 /*-------------------------------------------------------------------
- * sendcmd, sendbyte, sendetx, sendflt, sendint implement the command
+ * sendcmd, sendbyte, sendetx, sendflt implement the command
  * interface to the receiver.
  *
- * CAVEAT: the sendflt, sendint routines are byte order dependent and
+ * CAVEAT: the sendflt routine is byte order dependent and
  * float implementation dependent - these must be converted to portable
  * versions !
  *
@@ -4502,7 +4502,6 @@ struct txbuf
 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
@@ -4560,17 +4559,6 @@ sendetx(
 }
 
 void
-sendint(
-	struct txbuf *buf,
-	int a
-	)
-{
-	/* send 16bit int, msbyte first */
-	sendbyte(buf, (uint8_t)((a>>8) & 0xff));
-	sendbyte(buf, (uint8_t)(a & 0xff));
-}
-
-void
 sendflt(
 	struct txbuf *buf,
 	double a



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/757485b84d69cf7213d7719bcccccd385382f778...abc2df91718d4150259c9f9af22381835c679d93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170408/ed45f575/attachment.html>


More information about the vc mailing list