[Git][NTPsec/ntpsec][master] Explicit unused declarations everywhere. A step towaeds being -Wextra clean.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Nov 22 20:27:33 UTC 2015


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
12d0c18e by Eric S. Raymond at 2015-11-22T15:27:03Z
Explicit unused declarations everywhere. A step towaeds being -Wextra clean.

Also, avoid a -Wextra warning in ignore-macro declrations.

- - - - -


63 changed files:

- include/ntp_io.h
- libisc/include/isc/util.h
- libisc/log.c
- libntp/a_md5encrypt.c
- libntp/audio.c
- libntp/icom.c
- libntp/ntp_intres.c
- libparse/clk_computime.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_trimtsip.c
- libparse/clk_varitext.c
- libparse/clk_wharton.c
- libparse/ieee754io.c
- libparse/parse.c
- ntpd/ntp_config.c
- ntpd/ntp_control.c
- ntpd/ntp_io.c
- ntpd/ntp_loopfilter.c
- ntpd/ntp_proto.c
- ntpd/ntp_refclock.c
- ntpd/ntp_timer.c
- ntpd/ntpd.c
- ntpd/refclock_acts.c
- ntpd/refclock_arbiter.c
- ntpd/refclock_arc.c
- ntpd/refclock_as2201.c
- ntpd/refclock_atom.c
- ntpd/refclock_chu.c
- ntpd/refclock_dumbclock.c
- ntpd/refclock_gpsdjson.c
- ntpd/refclock_hopfpci.c
- ntpd/refclock_hopfser.c
- ntpd/refclock_hpgps.c
- ntpd/refclock_irig.c
- ntpd/refclock_jjy.c
- ntpd/refclock_jupiter.c
- ntpd/refclock_local.c
- ntpd/refclock_mx4200.c
- ntpd/refclock_neoclock4x.c
- ntpd/refclock_nmea.c
- ntpd/refclock_oncore.c
- ntpd/refclock_palisade.c
- ntpd/refclock_parse.c
- ntpd/refclock_pcf.c
- ntpd/refclock_spectracom.c
- ntpd/refclock_true.c
- ntpd/refclock_tsyncpci.c
- ntpd/refclock_zyfer.c
- ntpdig/main.c
- ntpfrob/stepback.c
- ntpfrob/tickadj.c
- ntpq/libntpq.c
- ntpq/ntpq-subs.c
- ntpq/ntpq.c
- ntptime/ntptime.c
- util/hist.c


Changes:

=====================================
include/ntp_io.h
=====================================
--- a/include/ntp_io.h
+++ b/include/ntp_io.h
@@ -59,6 +59,6 @@ extern	void	maintain_activefds(int fd, int closing);
 #endif
 
 /* hack to ignore GCC Unused Result */
-#define IGNORE(r) do{if(r);}while(0) 
+#define IGNORE(r) do{if(r){}}while(0)
 
 #endif	/* GUARD_NTP_IO_H */


=====================================
libisc/include/isc/util.h
=====================================
--- a/libisc/include/isc/util.h
+++ b/libisc/include/isc/util.h
@@ -189,7 +189,7 @@
 #define RUNTIME_CHECK(cond)		ISC_ERROR_RUNTIMECHECK(cond)
 
 /* hack to ignore GCC Unused Result */
-#define ISC_IGNORE(r) do{if(r);}while(0)
+#define ISC_IGNORE(r) do{if(r){}}while(0)
 
 /*%
  * Time


=====================================
libisc/log.c
=====================================
--- a/libisc/log.c
+++ b/libisc/log.c
@@ -1352,6 +1352,9 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
 	isc_logchannellist_t *category_channels;
 	isc_result_t result;
 
+	UNUSED_ARG(msgset);
+	UNUSED_ARG(msg);
+
 	REQUIRE(lctx == NULL || VALID_CONTEXT(lctx));
 	REQUIRE(category != NULL);
 	REQUIRE(module != NULL);


=====================================
libntp/a_md5encrypt.c
=====================================
--- a/libntp/a_md5encrypt.c
+++ b/libntp/a_md5encrypt.c
@@ -27,6 +27,7 @@ MD5authencrypt(
 	u_int	len;
 	EVP_MD_CTX ctx;
 
+	UNUSED_ARG(type);
 	/*
 	 * Compute digest of key concatenated with packet. Note: the
 	 * key type and digest type have been verified when the key
@@ -68,6 +69,7 @@ MD5authdecrypt(
 	u_int	len;
 	EVP_MD_CTX ctx;
 
+	UNUSED_ARG(type);
 	/*
 	 * Compute digest of key concatenated with packet. Note: the
 	 * key type and digest type have been verified when the key


=====================================
libntp/audio.c
=====================================
--- a/libntp/audio.c
+++ b/libntp/audio.c
@@ -118,6 +118,8 @@ audio_config_read(
 	FILE *fd;
 	char device[20], line[100], ab[100];
 
+	UNUSED_ARG(c_dev);
+	UNUSED_ARG(i_dev);
 	snprintf(device, sizeof(device), "%s%d", INIT_FILE, unit);
 	if ((fd = fopen(device, "r")) == NULL) {
 		printf("audio_config_read: <%s> NO\n", device);


=====================================
libntp/icom.c
=====================================
--- a/libntp/icom.c
+++ b/libntp/icom.c
@@ -129,6 +129,8 @@ icom_init(
 	int rc;
 	int saved_errno;
 
+	UNUSED_ARG(trace);
+
 	fd = tty_open(device, O_RDWR, 0777);
 	if (fd < 0)
 		return -1;


=====================================
libntp/ntp_intres.c
=====================================
--- a/libntp/ntp_intres.c
+++ b/libntp/ntp_intres.c
@@ -441,6 +441,10 @@ getaddrinfo_sometime_complete(
 	const char *		fam_spec;
 	int			i;
 
+	UNUSED_ARG(context);
+	UNUSED_ARG(rtype);
+	UNUSED_ARG(respsize);
+
 	gai_req = context;
 	gai_resp = resp;
 
@@ -728,6 +732,9 @@ getnameinfo_sometime_complete(
 	time_t			time_now;
 	int			again;
 
+	UNUSED_ARG(rtype);
+	UNUSED_ARG(respsize);
+
 	gni_req = context;
 	gni_resp = resp;
 
@@ -990,6 +997,8 @@ should_retry_dns(
 	char		msg[256];
 #endif
 
+	UNUSED_ARG(res_errno);
+
 	/*
 	 * If the resolver failed, see if the failure is
 	 * temporary. If so, return success.


=====================================
libparse/clk_computime.c
=====================================
--- a/libparse/clk_computime.c
+++ b/libparse/clk_computime.c
@@ -80,6 +80,8 @@ cvt_computime(
 	void          *local
 	)
 {
+	UNUSED_ARG(size);
+	UNUSED_ARG(local);
 
 	if (!Strok(buffer, format->fixed_string)) {
 		return CVT_NONE;


=====================================
libparse/clk_dcf7000.c
=====================================
--- a/libparse/clk_dcf7000.c
+++ b/libparse/clk_dcf7000.c
@@ -55,7 +55,10 @@ cvt_dcf7000(
 	    void          *local
 	    )
 {
-	if (!Strok(buffer, format->fixed_string))
+    UNUSED_ARG(size);
+    UNUSED_ARG(local);
+
+    if (!Strok(buffer, format->fixed_string))
 	{
 		return CVT_NONE;
 	}


=====================================
libparse/clk_hopf6021.c
=====================================
--- a/libparse/clk_hopf6021.c
+++ b/libparse/clk_hopf6021.c
@@ -134,6 +134,9 @@ cvt_hopf6021(
 {
 	unsigned char status,weekday;
 
+	UNUSED_ARG(size);
+	UNUSED_ARG(local);
+
 	if (!Strok(buffer, format->fixed_string))
 	{
 		return CVT_NONE;


=====================================
libparse/clk_meinberg.c
=====================================
--- a/libparse/clk_meinberg.c
+++ b/libparse/clk_meinberg.c
@@ -240,6 +240,10 @@ cvt_meinberg(
 {
 	struct format *format;
 
+	UNUSED_ARG(size);
+	UNUSED_ARG(unused);
+	UNUSED_ARG(local);
+
 	/*
 	 * select automagically correct data format
 	 */


=====================================
libparse/clk_rawdcf.c
=====================================
--- a/libparse/clk_rawdcf.c
+++ b/libparse/clk_rawdcf.c
@@ -320,6 +320,8 @@ cvt_rawdcf(
 	 * a 200ms pulse would create all zeroes (and probably a frame error)
 	 */
 
+	UNUSED_ARG(param);
+
 	for (i = 0; i < BITS; i++)
 	{
 		histbuf[i] = 0;


=====================================
libparse/clk_rcc8000.c
=====================================
--- a/libparse/clk_rcc8000.c
+++ b/libparse/clk_rcc8000.c
@@ -71,7 +71,10 @@ cvt_rcc8000(
 	    void          *local
 	    )
 {
-	if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
+    UNUSED_ARG(size);
+    UNUSED_ARG(local);
+
+    if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
 #define	OFFS(x) format->field_offsets[(x)].offset
 #define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
 	if (	STOI(O_DAY,	&clock_time->day)	||


=====================================
libparse/clk_schmid.c
=====================================
--- a/libparse/clk_schmid.c
+++ b/libparse/clk_schmid.c
@@ -79,6 +79,9 @@ cvt_schmid(
 	   void          *local
 	)
 {
+	UNUSED_ARG(format);
+	UNUSED_ARG(local);
+
 	if ((size != 11) || (buffer[10] != (unsigned char)'\375'))
 	{
 		return CVT_NONE;
@@ -171,6 +174,8 @@ inp_schmid(
 {
 	unsigned int rtc;
 
+	UNUSED_ARG(tstamp);
+
 	parseprintf(DD_PARSE, ("inp_schmid(0x%lx, 0x%x, ...)\n", (long)parseio, ch));
 
 	switch ((uint8_t)ch)


=====================================
libparse/clk_sel240x.c
=====================================
--- a/libparse/clk_sel240x.c
+++ b/libparse/clk_sel240x.c
@@ -121,6 +121,9 @@ cvt_sel240x( unsigned char *buffer,
 {
 	unsigned long rc = CVT_NONE;
 
+	UNUSED_ARG(size);
+	UNUSED_ARG(local);
+
 	if( Strok(buffer, format->fixed_string) )
 	{
 		struct tm ptime;


=====================================
libparse/clk_trimtaip.c
=====================================
--- a/libparse/clk_trimtaip.c
+++ b/libparse/clk_trimtaip.c
@@ -68,6 +68,9 @@ cvt_trimtaip(
 	long   recv_csum;
 	int	 i;
 
+	UNUSED_ARG(size);
+	UNUSED_ARG(local);
+
 	if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
 #define	OFFS(x) format->field_offsets[(x)].offset
 #define	STOI(x, y) \


=====================================
libparse/clk_trimtsip.c
=====================================
--- a/libparse/clk_trimtsip.c
+++ b/libparse/clk_trimtsip.c
@@ -190,6 +190,8 @@ cvt_trimtsip(
 #define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
 	register uint8_t cmd;
 
+	UNUSED_ARG(format);
+
 	clock_time->flags = 0;
 
 	if (!t) {


=====================================
libparse/clk_varitext.c
=====================================
--- a/libparse/clk_varitext.c
+++ b/libparse/clk_varitext.c
@@ -105,6 +105,8 @@ cvt_varitext(
 	     void		*local
 	     )
 {
+  UNUSED_ARG(size);
+  UNUSED_ARG(local);
 
   if (!Strok(buffer, format->fixed_string)) {
     return CVT_NONE;


=====================================
libparse/clk_wharton.c
=====================================
--- a/libparse/clk_wharton.c
+++ b/libparse/clk_wharton.c
@@ -75,6 +75,9 @@ cvt_wharton_400a(
 {
 	int	i;
 
+	UNUSED_ARG(format);
+	UNUSED_ARG(local);
+
 	/* The given `size' includes a terminating null-character. */
 	if (size != 15 || buffer[0] != STX || buffer[14] != ETX
 	    || buffer[13] < '0' || buffer[13] > ('0' + 0xf))


=====================================
libparse/ieee754io.c
=====================================
--- a/libparse/ieee754io.c
+++ b/libparse/ieee754io.c
@@ -391,6 +391,9 @@ put_ieee754(
 #endif
 /*int length;*/
   unsigned long mask;
+
+  UNUSED_ARG(bufpp);
+  UNUSED_ARG(offsets);
   
   outlfp = *lfpp;
 


=====================================
libparse/parse.c
=====================================
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -542,6 +542,8 @@ syn_simple(
 	register u_long why
 	)
 {
+	UNUSED_ARG(format);
+	UNUSED_ARG(why);
 	parseio->parse_dtime.parse_stime = *ts;
 }
 
@@ -558,6 +560,7 @@ pps_simple(
 	register timestamp_t *ptime
 	)
 {
+	UNUSED_ARG(status);
 	parseio->parse_dtime.parse_ptime  = *ptime;
 	parseio->parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
 
@@ -774,6 +777,8 @@ parse_getfmt(
 	parse_t    *parse
 	)
 {
+	UNUSED_ARG(dct);
+	UNUSED_ARG(parse);
 	if (dct->parseformat.parse_format < nformats &&
 	    Strlen(clockformats[dct->parseformat.parse_format]->name) <= PARSE_TCMAX)
 	{


=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -3017,6 +3017,8 @@ config_mdnstries(
 #if defined(HAVE_DNS_SD_H) && defined(ENABLE_MDNS_REGISTRATION)
 	extern int mdnstries;
 	mdnstries = ptree->mdnstries;
+#else
+	UNUSED_ARG(ptree);
 #endif  /* ENABLE_MDNS_REGISTRATION */
 }
 
@@ -4015,7 +4017,9 @@ unpeer_name_resolved(
 	u_short		af;
 	const char *	fam_spec;
 
+	(void)gai_errno;
 	(void)context;
+	(void)service;
 	(void)hints;
 	DPRINTF(1, ("unpeer_name_resolved(%s) rescode %d\n", name, rescode));
 
@@ -4829,6 +4833,9 @@ getnetnum(
 	enum gnn_type a_type	/* ignored */
 	)
 {
+	UNUSED_ARG(complain);
+	UNUSED_ARG(a_type);
+
 	NTP_REQUIRE(AF_UNSPEC == AF(addr) ||
 		    AF_INET == AF(addr) ||
 		    AF_INET6 == AF(addr));
@@ -4860,6 +4867,11 @@ ntp_rlimit(
 {
 	struct rlimit	rl;
 
+#ifndef DEBUG
+	UNUSED_ARG(rl_scale);
+	UNUSED_ARG(rl_sstr);
+#endif
+
 	switch (rl_what) {
 #ifdef RLIMIT_MEMLOCK
 	    case RLIMIT_MEMLOCK:


=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -2906,6 +2906,9 @@ control_unspec(
 {
 	struct peer *peer;
 
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	/*
 	 * What is an appropriate response to an unspecified op-code?
 	 * I return no errors and no data, unless a specified assocation
@@ -2941,6 +2944,8 @@ read_status(
 	/* a_st holds association ID, status pairs alternating */
 	u_short a_st[CTL_MAX_DATA_LEN / sizeof(u_short)];
 
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
 #ifdef DEBUG
 	if (debug > 2)
 		printf("read_status: ID %d\n", res_associd);
@@ -3111,6 +3116,9 @@ read_variables(
 	int restrict_mask
 	)
 {
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	if (res_associd)
 		read_peervars();
 	else
@@ -3138,6 +3146,9 @@ write_variables(
 	const char *t;
 	char *tt;
 
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	val = 0;
 	/*
 	 * If he's trying to write into a peer tell him no way
@@ -4008,6 +4019,8 @@ read_ifstats(
 	u_int	ifidx;
 	endpt *	la;
 
+	UNUSED_ARG(rbufp);
+
 	/*
 	 * loop over [0..sys_ifnum] searching ep_list for each
 	 * ifnum in turn.
@@ -4164,6 +4177,8 @@ read_addr_restrictions(
 {
 	u_int idx;
 
+	UNUSED_ARG(rbufp);
+
 	idx = 0;
 	send_restrict_list(restrictlist4, false, &idx);
 	send_restrict_list(restrictlist6, true, &idx);
@@ -4187,6 +4202,9 @@ read_ordlist(
 	struct ntp_control *	cpkt;
 	u_short			qdata_octets;
 
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	/*
 	 * CTL_OP_READ_ORDLIST_A was first named CTL_OP_READ_IFSTATS and
 	 * used only for ntpq -c ifstats.  With the addition of reslist
@@ -4224,6 +4242,8 @@ static void req_nonce(
 {
 	char	buf[64];
 
+	UNUSED_ARG(restrict_mask);
+
 	generate_nonce(rbufp, buf, sizeof(buf));
 	ctl_putunqstr("nonce", buf, strlen(buf));
 	ctl_flushpkt(0);
@@ -4241,6 +4261,8 @@ read_clockstatus(
 	)
 {
 #ifndef REFCLOCK
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
 	/*
 	 * If no refclock support, no data to return
 	 */
@@ -4257,6 +4279,9 @@ read_clockstatus(
 	struct ctl_var *	kv;
 	struct refclockstat	cs;
 
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	if (res_associd != 0) {
 		peer = findpeerbyassoc(res_associd);
 	} else {
@@ -4347,6 +4372,9 @@ write_clockstatus(
 	int restrict_mask
 	)
 {
+	UNUSED_ARG(rbufp);
+	UNUSED_ARG(restrict_mask);
+
 	ctl_error(CERR_PERMISSION);
 }
 


=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -1679,6 +1679,10 @@ check_flags6(
 	close(fd);
 	if ((ifr6.ifr_ifru.ifru_flags6 & flags6) != 0)
 		return true;
+#else
+	UNUSED_ARG(psau);
+	UNUSED_ARG(name);
+	UNUSED_ARG(flags6);
 #endif	/* USE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 */
 	return false;
 }
@@ -1692,6 +1696,8 @@ is_anycast(
 #ifdef IN6_IFF_ANYCAST
 	return check_flags6(psau, name, IN6_IFF_ANYCAST);
 #else
+	UNUSED_ARG(psau);
+	UNUSED_ARG(name);
 	return false;
 #endif
 }
@@ -3320,6 +3326,10 @@ fetch_timestamp(
 	l_fp			dts;
 #endif
 
+#ifndef DEBUG_TIMING
+	UNUSED_ARG(rb);
+#endif
+
 	cmsghdr = CMSG_FIRSTHDR(msghdr);
 	while (cmsghdr != NULL) {
 		switch (cmsghdr->cmsg_type)
@@ -4361,6 +4371,8 @@ kill_asyncio(
 	int	startfd
 	)
 {
+	UNUSED_ARG(startfd);
+
 	BLOCKIO();
 
 	/*


=====================================
ntpd/ntp_loopfilter.c
=====================================
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -1372,6 +1372,7 @@ pll_trap(
 	int arg
 	)
 {
+	UNUSED_ARG(arg);
 	pll_control = false;
 	siglongjmp(env, 1);
 }


=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -1565,6 +1565,8 @@ process_packet(
 	double	etemp, ftemp, td;
 #endif /* ENABLE_ASYMMETRIC */
 
+	UNUSED_ARG(len);
+
 	sys_processed++;
 	peer->processed++;
 	p_del = FPTOD(NTOHS_FP(pkt->rootdelay));
@@ -3811,6 +3813,10 @@ pool_name_resolved(
 	struct peer *	pool;	/* pool solicitor association */
 	associd_t	assoc;
 
+	UNUSED_ARG(gai_errno);
+	UNUSED_ARG(service);
+	UNUSED_ARG(hints);
+
 	if (rescode) {
 		msyslog(LOG_ERR,
 			"error resolving pool %s: %s (%d)",


=====================================
ntpd/ntp_refclock.c
=====================================
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -902,6 +902,10 @@ refclock_ioctl(
 	u_int	lflags		/* line discipline flags */
 	)
 {
+	UNUSED_ARG(fd);
+#ifndef DEBUG
+	UNUSED_ARG(lflags);
+#endif /* DEBUG */
 	/*
 	 * simply return true if no UNIX line discipline is supported
 	 */
@@ -1177,6 +1181,8 @@ refclock_pps(
 	struct timespec timeout;
 	double	dtemp;
 
+	UNUSED_ARG(mode);
+
 	/*
 	 * We require the clock to be synchronized before setting the
 	 * parameters. When the parameters have been set, fetch the


=====================================
ntpd/ntp_timer.c
=====================================
--- a/ntpd/ntp_timer.c
+++ b/ntpd/ntp_timer.c
@@ -115,6 +115,8 @@ set_timer_or_die(
 	const char *	setfunc;
 	int		rc;
 
+	UNUSED_ARG(ptimer);
+
 #ifdef HAVE_TIMER_CREATE
 	setfunc = "timer_settime";
 	rc = timer_settime(timer_id, 0, &itimer, NULL);
@@ -420,6 +422,8 @@ alarming(
 	const char *msg = "alarming: initializing TRUE\n";
 # endif
 
+	UNUSED_ARG(sig);
+
 	if (!initializing) {
 		if (alarm_flag) {
 			alarm_overflow++;


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -1248,6 +1248,7 @@ moredebug(
 {
 	int saved_errno = errno;
 
+	UNUSED_ARG(sig);
 	if (debug < 255)
 	{
 		debug++;
@@ -1267,6 +1268,7 @@ lessdebug(
 {
 	int saved_errno = errno;
 
+	UNUSED_ARG(sig);
 	if (debug > 0)
 	{
 		debug--;


=====================================
ntpd/refclock_acts.c
=====================================
--- a/ntpd/refclock_acts.c
+++ b/ntpd/refclock_acts.c
@@ -292,6 +292,8 @@ acts_shutdown(
 	struct actsunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Warning: do this only when a call is not in progress.
 	 */
@@ -643,6 +645,8 @@ acts_poll(
 	struct actsunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * This routine is called at every system poll. All it does is
 	 * set flag1 under certain conditions. The real work is done by
@@ -697,6 +701,8 @@ acts_timer(
 	struct actsunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * This routine implments a timeout which runs for a programmed
 	 * interval. The counter is initialized by the state machine and


=====================================
ntpd/refclock_arbiter.c
=====================================
--- a/ntpd/refclock_arbiter.c
+++ b/ntpd/refclock_arbiter.c
@@ -209,6 +209,8 @@ arb_shutdown(
 	register struct arbunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -434,6 +436,8 @@ arb_poll(
 	register struct arbunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Time to poll the clock. The Arbiter clock responds to a "B5"
 	 * by returning a timecode in the format specified above.


=====================================
ntpd/refclock_arc.c
=====================================
--- a/ntpd/refclock_arc.c
+++ b/ntpd/refclock_arc.c
@@ -547,6 +547,8 @@ dummy_event_handler(
 	struct peer *peer
 	)
 {
+	UNUSED_ARG(peer);
+
 #ifdef DEBUG
 	if(debug) { printf("arc: dummy_event_handler() called.\n"); }
 #endif
@@ -745,6 +747,8 @@ arc_shutdown(
 	register struct arcunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	peer->procptr->action = dummy_event_handler;
 
 	pp = peer->procptr;
@@ -787,6 +791,8 @@ send_slow(
 	int sl = strlen(s);
 	int spaceleft = space_left(up);
 
+	UNUSED_ARG(fd);
+
 #ifdef DEBUG
 	if(debug > 1) { printf("arc: spaceleft = %d.\n", spaceleft); }
 #endif
@@ -1421,6 +1427,9 @@ request_time(
 {
 	struct refclockproc *pp = peer->procptr;
 	register struct arcunit *up = pp->unitptr;
+
+	UNUSED_ARG(unit);
+
 #ifdef DEBUG
 	if(debug) { printf("arc: unit %d: requesting time.\n", unit); }
 #endif


=====================================
ntpd/refclock_as2201.c
=====================================
--- a/ntpd/refclock_as2201.c
+++ b/ntpd/refclock_as2201.c
@@ -210,6 +210,8 @@ as2201_shutdown(
 	register struct as2201unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -362,6 +364,8 @@ as2201_poll(
 {
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Send a "\r*toc\r" to get things going. We go to great pains
 	 * to avoid changing state, since there may be more than one


=====================================
ntpd/refclock_atom.c
=====================================
--- a/ntpd/refclock_atom.c
+++ b/ntpd/refclock_atom.c
@@ -165,6 +165,8 @@ atom_shutdown(
 	struct refclockproc *pp;
 	struct ppsunit *up;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (up->fddev > 0)
@@ -185,6 +187,8 @@ atom_timer(
 	struct refclockproc *pp;
 	char	tbuf[80];
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (refclock_pps(peer, &up->atom, pp->sloppyclockflag) <= 0)
@@ -215,6 +219,8 @@ atom_poll(
 {
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Don't wiggle the clock until some other driver has numbered
 	 * the seconds.


=====================================
ntpd/refclock_chu.c
=====================================
--- a/ntpd/refclock_chu.c
+++ b/ntpd/refclock_chu.c
@@ -590,6 +590,8 @@ chu_shutdown(
 	struct chuunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (up == NULL)
@@ -1307,6 +1309,8 @@ chu_poll(
 {
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	pp->polls++;
 }
@@ -1328,6 +1332,8 @@ chu_second(
 	int	minset, i;
 	double	dtemp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 


=====================================
ntpd/refclock_dumbclock.c
=====================================
--- a/ntpd/refclock_dumbclock.c
+++ b/ntpd/refclock_dumbclock.c
@@ -171,6 +171,8 @@ dumbclock_shutdown(
 	register struct dumbclock_unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)


=====================================
ntpd/refclock_gpsdjson.c
=====================================
--- a/ntpd/refclock_gpsdjson.c
+++ b/ntpd/refclock_gpsdjson.c
@@ -740,6 +740,7 @@ poll_secondary(
 	clockprocT * const pp   ,
 	gpsd_unitT * const up   )
 {
+	UNUSED_ARG(up);
 	if (pp->coderecv != pp->codeproc) {
 		/* all is well */
 		pp->lastref = pp->lastrec;
@@ -760,6 +761,8 @@ gpsd_poll(
 	clockprocT * const pp = peer->procptr;
 	gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
 
+	UNUSED_ARG(unit);
+
 	++pp->polls;
 	if (peer == up->pps_peer)
 		poll_secondary(peer, pp, up);
@@ -779,6 +782,10 @@ gpsd_control(
 	clockprocT * const pp = peer->procptr;
 	gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
 
+	UNUSED_ARG(unit);
+	UNUSED_ARG(in_st);
+	UNUSED_ARG(out_st);
+
 	if (peer == up->pps_peer) {
 		DTOLFP(pp->fudgetime1, &up->pps_fudge2);
 		if ( ! (pp->sloppyclockflag & CLK_FLAG1))
@@ -878,6 +885,8 @@ gpsd_timer(
 	clockprocT * const pp = peer->procptr;
 	gpsd_unitT * const up = (gpsd_unitT *)pp->unitptr;
 
+	UNUSED_ARG(unit);
+
 	if (peer == up->pps_peer)
 		timer_secondary(peer, pp, up);
 	else
@@ -1415,6 +1424,8 @@ process_watch(
 
 	const char * path;
 
+	UNUSED_ARG(rtime);
+
 	path = json_object_lookup_string(jctx, 0, "device");
 	if (NULL == path || strcmp(path, up->device))
 		return;
@@ -1445,6 +1456,8 @@ process_version(
 	const char *release;
 	uint16_t    pvhi, pvlo;
 
+	UNUSED_ARG(rtime);
+
 	/* get protocol version number */
 	revision = json_object_lookup_string_default(
 		jctx, 0, "rev", "(unknown)");


=====================================
ntpd/refclock_hopfpci.c
=====================================
--- a/ntpd/refclock_hopfpci.c
+++ b/ntpd/refclock_hopfpci.c
@@ -166,6 +166,7 @@ hopfpci_shutdown(
 	struct peer *peer
 	)
 {
+	UNUSED_ARG(unit);
 
 #ifndef SYS_WINNT
 	close(fd);


=====================================
ntpd/refclock_hopfser.c
=====================================
--- a/ntpd/refclock_hopfser.c
+++ b/ntpd/refclock_hopfser.c
@@ -166,6 +166,8 @@ hopfserial_shutdown (
 	register struct hopfclock_unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 
@@ -329,6 +331,9 @@ hopfserial_poll (
 {
 	register struct hopfclock_unit *up;
 	struct refclockproc *pp;
+
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 
 	up = pp->unitptr;


=====================================
ntpd/refclock_hpgps.c
=====================================
--- a/ntpd/refclock_hpgps.c
+++ b/ntpd/refclock_hpgps.c
@@ -227,6 +227,8 @@ hpgps_shutdown(
 	register struct hpgpsunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -601,6 +603,8 @@ hpgps_poll(
 	register struct hpgpsunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Time to poll the clock. The HP 58503A responds to a
 	 * ":PTIME:TCODE?" by returning a timecode in the format specified


=====================================
ntpd/refclock_irig.c
=====================================
--- a/ntpd/refclock_irig.c
+++ b/ntpd/refclock_irig.c
@@ -385,6 +385,8 @@ irig_shutdown(
 	struct refclockproc *pp;
 	struct irigunit *up;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -749,6 +751,8 @@ irig_baud(
 	double	dtemp;
 	l_fp	ltemp;
 
+	UNUSED_ARG(bits);
+
         pp = peer->procptr;
 	up = pp->unitptr;
 
@@ -979,6 +983,8 @@ irig_poll(
 {
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 
 	if (pp->coderecv == pp->codeproc) {


=====================================
ntpd/refclock_jjy.c
=====================================
--- a/ntpd/refclock_jjy.c
+++ b/ntpd/refclock_jjy.c
@@ -1089,6 +1089,7 @@ static  struct
 static int
 jjy_start_tristate_jjy01 ( int unit, struct peer *peer, struct jjyunit *up )
 {
+	UNUSED_ARG(unit);
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Tristate Ltd. TS-JJY01, TS-JJY02" ) ;
 
@@ -1311,6 +1312,8 @@ jjy_poll_tristate_jjy01  ( int unit, struct peer *peer )
 	static const char *sFunctionName = "jjy_poll_tristate_jjy01" ;
 #endif
 
+	UNUSED_ARG(unit);
+
 	struct refclockproc *pp ;
 	struct jjyunit	    *up ;
 
@@ -1382,6 +1385,8 @@ jjy_start_cdex_jst2000 ( int unit, struct peer *peer, struct jjyunit *up )
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: C-DEX Co. Ltd. JST2000" ) ;
 
+	UNUSED_ARG(unit);
+
 	up->unittype  = UNITTYPE_CDEX_JST2000 ;
 	up->linespeed = SPEED232_CDEX_JST2000 ;
 	up->linediscipline = LDISC_RAW ;
@@ -1490,6 +1495,8 @@ jjy_poll_cdex_jst2000 ( int unit, struct peer *peer )
 	struct refclockproc *pp ;
 	struct jjyunit      *up ;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -1545,6 +1552,7 @@ jjy_poll_cdex_jst2000 ( int unit, struct peer *peer )
 static int
 jjy_start_echokeisokuki_lt2000 ( int unit, struct peer *peer, struct jjyunit *up )
 {
+	UNUSED_ARG(unit);
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Echo Keisokuki Co. Ltd. LT2000" ) ;
 
@@ -1713,6 +1721,8 @@ jjy_poll_echokeisokuki_lt2000 ( int unit, struct peer *peer )
 
 	char	sCmd[2] ;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -1760,6 +1770,7 @@ jjy_poll_echokeisokuki_lt2000 ( int unit, struct peer *peer )
 static int
 jjy_start_citizentic_jjy200 ( int unit, struct peer *peer, struct jjyunit *up )
 {
+	UNUSED_ARG(unit);
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: CITIZEN T.I.C CO. LTD. JJY200" ) ;
 
@@ -1869,6 +1880,7 @@ jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
 static void
 jjy_poll_citizentic_jjy200 ( int unit, struct peer *peer )
 {
+	UNUSED_ARG(unit);
 
 	struct refclockproc *pp ;
 	struct jjyunit	    *up ;
@@ -1941,6 +1953,7 @@ static  struct
 static int
 jjy_start_tristate_gpsclock01 ( int unit, struct peer *peer, struct jjyunit *up )
 {
+	UNUSED_ARG(unit);
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Tristate Ltd. TS-GPS01" ) ;
 
@@ -2197,6 +2210,8 @@ jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
 	const char	*pCmd ;
 	int 	iCmdLen ;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -2261,6 +2276,7 @@ static struct jjyRawDataBreak seiko_tsys_tdc_300_raw_break [ ] =
 static int
 jjy_start_seiko_tsys_tdc_300 ( int unit, struct peer *peer, struct jjyunit *up )
 {
+	UNUSED_ARG(unit);
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: SEIKO TIME SYSTEMS TDC-300" ) ;
 
@@ -2449,6 +2465,7 @@ jjy_receive_seiko_tsys_tdc_300 ( struct recvbuf *rbufp )
 static void
 jjy_poll_seiko_tsys_tdc_300 ( int unit, struct peer *peer )
 {
+	UNUSED_ARG(unit);
 
 	struct refclockproc *pp ;
 	struct jjyunit	    *up ;
@@ -2643,6 +2660,8 @@ jjy_start_telephone ( int unit, struct peer *peer, struct jjyunit *up )
 
 	jjy_write_clockstats( peer, JJY_CLOCKSTATS_MARK_JJY, "Refclock: Telephone JJY" ) ;
 
+	UNUSED_ARG(unit);
+
 	up->unittype  = UNITTYPE_TELEPHONE ;
 	up->linespeed = SPEED232_TELEPHONE ;
 	up->linediscipline = LDISC_RAW ;
@@ -2819,6 +2838,8 @@ jjy_poll_telephone ( int unit, struct peer *peer )
 	struct	refclockproc *pp ;
 	struct	jjyunit      *up ;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -3068,6 +3089,9 @@ teljjy_getDelay ( struct peer *peer, struct jjyunit *up )
 static int
 teljjy_idle_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_idle_ignore" ) ;
 
@@ -3079,6 +3103,9 @@ teljjy_idle_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 static int
 teljjy_idle_dialout ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_idle_dialout" ) ;
 
@@ -3092,6 +3119,9 @@ teljjy_idle_dialout ( struct peer *peer, struct refclockproc *pp, struct jjyunit
 static int
 teljjy_dial_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_dial_ignore" ) ;
 
@@ -3103,6 +3133,9 @@ teljjy_dial_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 static int
 teljjy_dial_login ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_dial_login" ) ;
 
@@ -3114,6 +3147,9 @@ teljjy_dial_login ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 teljjy_dial_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_dial_disc" ) ;
 
@@ -3125,6 +3161,9 @@ teljjy_dial_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
 static int
 teljjy_login_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_login_ignore" ) ;
 
@@ -3136,6 +3175,9 @@ teljjy_login_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit
 static int
 teljjy_login_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_login_disc" ) ;
 
@@ -3150,6 +3192,9 @@ teljjy_login_conn ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 
 	int	i ;
 
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+
 	DEBUG_TELJJY_PRINTF( "teljjy_login_conn" ) ;
 
 	up->bLineError = false ;
@@ -3172,6 +3217,10 @@ teljjy_login_login ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 	char	*pCmd ;
 	int	iCmdLen ;
 
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
+
 	DEBUG_TELJJY_PRINTF( "teljjy_login_login" ) ;
 
 	/* Send a guest user ID */
@@ -3213,6 +3262,10 @@ static int
 teljjy_login_error ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
 
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
+
 	DEBUG_TELJJY_PRINTF( "teljjy_login_error" ) ;
 
 	return TELJJY_CHANGE_CLOCK_STATE ;
@@ -3223,6 +3276,9 @@ teljjy_login_error ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 static int
 teljjy_conn_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_conn_ignore" ) ;
 
@@ -3234,6 +3290,9 @@ teljjy_conn_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 static int
 teljjy_conn_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_conn_disc" ) ;
 
@@ -3520,6 +3579,9 @@ teljjy_conn_silent ( struct peer *peer, struct refclockproc *pp, struct jjyunit 
 static int
 teljjy_conn_error ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_conn_error" ) ;
 
@@ -3531,6 +3593,9 @@ teljjy_conn_error ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 teljjy_bye_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_bye_ignore" ) ;
 
@@ -3542,6 +3607,9 @@ teljjy_bye_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 teljjy_bye_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_bye_disc" ) ;
 
@@ -3553,6 +3621,9 @@ teljjy_bye_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up
 static int
 teljjy_bye_modem ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_TELJJY_PRINTF( "teljjy_bye_modem" ) ;
 
@@ -3733,6 +3804,8 @@ modem_connect ( int unit, struct peer *peer )
 	struct	refclockproc	*pp;
 	struct	jjyunit 	*up;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -3752,6 +3825,8 @@ modem_disconnect ( int unit, struct peer *peer )
 	struct	refclockproc	*pp;
 	struct	jjyunit 	*up;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -3828,6 +3903,8 @@ modem_timer ( int unit, struct peer *peer )
 	struct	refclockproc *pp ;
 	struct	jjyunit      *up ;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr ;
 	up = pp->unitptr ;
 
@@ -3895,6 +3972,9 @@ modem_control ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 static int
 modem_disc_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_disc_ignore" ) ;
 
@@ -3906,6 +3986,9 @@ modem_disc_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_disc_init ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_disc_init" ) ;
 
@@ -3917,6 +4000,9 @@ modem_disc_init ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up
 static int
 modem_init_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_init_ignore" ) ;
 
@@ -3928,6 +4014,8 @@ modem_init_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_init_start ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
 
 	DEBUG_MODEM_PRINTF( "modem_init_start" ) ;
 
@@ -4065,6 +4153,9 @@ modem_init_resp04 ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_init_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_init_disc" ) ;
 #ifdef DEBUG
@@ -4081,6 +4172,9 @@ modem_init_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up
 static int
 modem_dial_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_dial_ignore" ) ;
 
@@ -4092,6 +4186,7 @@ modem_dial_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_dial_dialout ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(up);
 
 	char	sCmd [ 46 ] ;
 	int	iCmdLen ;
@@ -4143,6 +4238,9 @@ modem_dial_escape ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_dial_connect ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_dial_connect" ) ;
 
@@ -4172,6 +4270,9 @@ modem_dial_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up
 static int
 modem_conn_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_conn_ignore" ) ;
 
@@ -4183,6 +4284,9 @@ modem_conn_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_conn_escape ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_conn_escape" ) ;
 
@@ -4194,6 +4298,9 @@ modem_conn_escape ( struct peer *peer, struct refclockproc *pp, struct jjyunit *
 static int
 modem_esc_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
+	UNUSED_ARG(up);
 
 	DEBUG_MODEM_PRINTF( "modem_esc_ignore" ) ;
 
@@ -4205,6 +4312,7 @@ modem_esc_ignore ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
 static int
 modem_esc_escape ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(up);
 
 	char	*pCmd ;
 	int	iCmdLen ;
@@ -4230,6 +4338,8 @@ modem_esc_escape ( struct peer *peer, struct refclockproc *pp, struct jjyunit *u
 static int
 modem_esc_data ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
+	UNUSED_ARG(peer);
+	UNUSED_ARG(pp);
 
 	DEBUG_MODEM_PRINTF( "modem_esc_data" ) ;
 
@@ -4243,7 +4353,6 @@ modem_esc_data ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up 
 static int
 modem_esc_silent ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up )
 {
-
 	DEBUG_MODEM_PRINTF( "modem_esc_silent" ) ;
 
 	up->iModemSilentCount ++ ;
@@ -4275,6 +4384,8 @@ modem_esc_disc ( struct peer *peer, struct refclockproc *pp, struct jjyunit *up 
 	char	*pCmd ;
 	int	iCmdLen ;
 
+	UNUSED_ARG(up);
+
 	DEBUG_MODEM_PRINTF( "modem_esc_disc" ) ;
 
 	/* Disconnect */


=====================================
ntpd/refclock_jupiter.c
=====================================
--- a/ntpd/refclock_jupiter.c
+++ b/ntpd/refclock_jupiter.c
@@ -225,6 +225,8 @@ jupiter_shutdown(int unit, struct peer *peer)
 	struct instance *instance;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	instance = pp->unitptr;
 	if (!instance)
@@ -408,6 +410,8 @@ jupiter_poll(int unit, struct peer *peer)
 	struct instance *instance;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	instance = pp->unitptr;
 
@@ -453,6 +457,10 @@ jupiter_control(
 	struct instance *instance;
 	uint8_t sloppyclockflag;
 
+	UNUSED_ARG(unit);
+	UNUSED_ARG(in);
+	UNUSED_ARG(out);
+
 	pp = peer->procptr;
 	instance = pp->unitptr;
 
@@ -854,6 +862,8 @@ jupiter_debug(
 	char	buffer[200];
 	va_list	ap;
 
+	UNUSED_ARG(function);
+
 	va_start(ap, fmt);
 	/*
 	 * Print debug message to stdout


=====================================
ntpd/refclock_local.c
=====================================
--- a/ntpd/refclock_local.c
+++ b/ntpd/refclock_local.c
@@ -107,6 +107,8 @@ local_start(
 {
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 
 	/*
@@ -147,6 +149,8 @@ local_poll(
 #endif /* HAVE_KERNEL_PLL ENABLE_LOCKCLOCK */
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Do no evil unless the house is dark or lit with our own lamp.
 	 */


=====================================
ntpd/refclock_mx4200.c
=====================================
--- a/ntpd/refclock_mx4200.c
+++ b/ntpd/refclock_mx4200.c
@@ -206,6 +206,8 @@ mx4200_shutdown(
 	register struct mx4200unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -547,6 +549,8 @@ mx4200_poll(
 	register struct mx4200unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 
@@ -1502,7 +1506,10 @@ mx4200_pps(
 static void
 mx4200_debug(struct peer *peer, char *fmt, ...)
 {
-#ifdef DEBUG
+	UNUSED_ARG(peer);
+#ifndef DEBUG
+	UNUSED_ARG(fmt);
+#else
 	va_list ap;
 
 	if (debug) {


=====================================
ntpd/refclock_neoclock4x.c
=====================================
--- a/ntpd/refclock_neoclock4x.c
+++ b/ntpd/refclock_neoclock4x.c
@@ -585,6 +585,8 @@ neoclock4x_poll(int unit,
   struct neoclock4x_unit *up;
   struct refclockproc *pp;
 
+  UNUSED_ARG(unit);
+
   pp = peer->procptr;
   up = pp->unitptr;
 


=====================================
ntpd/refclock_nmea.c
=====================================
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -1107,6 +1107,8 @@ nmea_poll(
 	struct refclockproc * const pp = peer->procptr;
 	nmea_unit	    * const up = (nmea_unit *)pp->unitptr;
 	
+	UNUSED_ARG(unit);
+
 	/*
 	 * Process median filter samples. If none received, declare a
 	 * timeout and keep going.


=====================================
ntpd/refclock_oncore.c
=====================================
--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -780,6 +780,8 @@ oncore_shutdown(
 	register struct instance *instance;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	instance = pp->unitptr;
 
@@ -1586,6 +1588,8 @@ oncore_get_timestamp(
 	double dmy;
 	struct timespec *tsp = 0;
 
+	UNUSED_ARG(dt1);
+
 	int	current_mode;
 	pps_params_t current_params;
 	struct timespec timeout;
@@ -1891,7 +1895,12 @@ oncore_msg_any(
 	int idx
 	)
 {
-#ifdef ONCORE_VERBOSE_MSG_ANY
+#ifndef ONCORE_VERBOSE_MSG_ANY
+	UNUSED_ARG(instance);
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
+	UNUSED_ARG(idx);
+#else
 	int i;
 	const char *fmt = oncore_messages[idx].fmt;
 	const char *p;
@@ -1951,6 +1960,9 @@ oncore_msg_Adef(
 	size_t len
 	)
 {
+	UNUSED_ARG(instance);
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
 }
 
 
@@ -1966,6 +1978,8 @@ oncore_msg_Ag(
 {
 	const char *cp;
 
+	UNUSED_ARG(len);
+
 	cp = "set to";
 	if (instance->o_state == ONCORE_RUN)
 		cp = "is";
@@ -1989,6 +2003,8 @@ oncore_msg_As(
 	size_t len
 	)
 {
+	UNUSED_ARG(len);
+
 	instance->ss_lat  = buf_w32(&buf[4]);
 	instance->ss_long = buf_w32(&buf[8]);
 	instance->ss_ht   = buf_w32(&buf[12]);
@@ -2011,6 +2027,8 @@ oncore_msg_At(
 	size_t len
 	)
 {
+	UNUSED_ARG(len);
+
 	instance->saw_At = 1;
 	if (instance->site_survey == ONCORE_SS_TESTING) {
 		if (buf[4] == 2) {
@@ -2037,6 +2055,8 @@ oncore_msg_Ay(
 	size_t len
 	)
 {
+	UNUSED_ARG(len);
+
 	if (instance->saw_Ay)
 		return;
 
@@ -2061,6 +2081,8 @@ oncore_msg_Az(
 	size_t len
 	)
 {
+	UNUSED_ARG(len);
+
 	if (instance->saw_Az)
 		return;
 
@@ -2426,6 +2448,7 @@ oncore_msg_Bd(
 	size_t len
 	)
 {
+	UNUSED_ARG(len);
 	oncore_log_f(instance, LOG_NOTICE,
 		     "Bd: Almanac %s, week = %d, t = %d, %d SVs: %x",
 		     ((buf[4]) ? "LOADED" : "(NONE)"), buf[5], buf[6],
@@ -2454,6 +2477,8 @@ oncore_msg_Bj(
 {
 	const char	*cp;
 
+	UNUSED_ARG(len);
+
 	instance->saw_Bj = 1;
 
 	switch(buf[4]) {
@@ -2493,6 +2518,8 @@ oncore_msg_Bl(
 		WARN_MINUS
 	} warn;
 
+	UNUSED_ARG(len);
+
 	day_now = day_lsf = 0;
 	cp = NULL;	/* keep gcc happy */
 
@@ -2673,6 +2700,8 @@ oncore_msg_CaFaIa(
 {
 	int	i;
 
+	UNUSED_ARG(len);
+
 	if (instance->o_state == ONCORE_TEST_SENT) {
 		enum antenna_state antenna;
 
@@ -2781,6 +2810,9 @@ oncore_msg_Cf(
 	size_t len
 	)
 {
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
+
 	if (instance->o_state == ONCORE_RESET_SENT) {
 		oncore_sendmsg(instance, oncore_cmd_Cg, sizeof(oncore_cmd_Cg)); /* Return to  Posn Fix mode */
 										       /* Reset set VP to IDLE */
@@ -2870,6 +2902,9 @@ oncore_msg_Cj_id(
 	char *cp2, Model[21];
 	const char *cp, *cp1;
 
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
+
 	/* Write Receiver ID message to clockstats file */
 
 	instance->Cj[294] = '\0';
@@ -2987,6 +3022,9 @@ oncore_msg_Cj_init(
 	int	mode;
 
 
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
+
 	/* The M12 with 1.3 or 2.0 Firmware, loses track of all Satellites and has to
 	 * start again if we go from 0D -> 3D, then loses them again when we
 	 * go from 3D -> 0D.  We do this to get a @@Ea message for SHMEM.
@@ -3090,6 +3128,7 @@ oncore_msg_Ga(
 	long lat, lon, ht;
 	double Lat, Lon, Ht;
 
+	UNUSED_ARG(len);
 
 	lat = buf_w32(&buf[4]);
 	lon = buf_w32(&buf[8]);
@@ -3128,6 +3167,8 @@ oncore_msg_Gb(
 	const char *	gmts;
 	int	mo, d, y, h, m, s, gmth, gmtm;
 
+	UNUSED_ARG(len);
+
 	mo = buf[4];
 	d  = buf[5];
 	y  = 256*buf[6]+buf[7];
@@ -3158,6 +3199,8 @@ oncore_msg_Gc(
 {
 	const char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
 
+	UNUSED_ARG(len);
+
 	instance->pps_control_msg_seen = 1;
 	oncore_log_f(instance, LOG_INFO, "PPS Control set to %s",
 		     tbl[buf[4]]);
@@ -3183,6 +3226,8 @@ oncore_msg_Gj(
 	int dt;
 	const char *cp;
 
+	UNUSED_ARG(len);
+
 	instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
 
 	/* print the message to verify whats there */
@@ -3247,6 +3292,9 @@ oncore_msg_Sz(
 	size_t len
 	)
 {
+	UNUSED_ARG(buf);
+	UNUSED_ARG(len);
+
 	if (instance && instance->peer) {
 		oncore_log(instance, LOG_ERR, "Oncore: System Failure at Power On");
 		oncore_shutdown(instance->unit, instance->peer);
@@ -3619,7 +3667,10 @@ oncore_print_Cb(
 	uint8_t *cp
 	)
 {
-#ifdef ONCORE_VERBOSE_CB
+#ifndef ONCORE_VERBOSE_CB
+	UNUSED_ARG(instance);
+	UNUSED_ARG(cp);
+#else
 	int	ii;
 	char	Msg[160], Msg2[10];
 


=====================================
ntpd/refclock_palisade.c
=====================================
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -363,6 +363,9 @@ palisade_shutdown (
 {
 	struct palisade_unit *up;
 	struct refclockproc *pp;
+
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)


=====================================
ntpd/refclock_parse.c
=====================================
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -1685,6 +1685,8 @@ local_nop(
 	struct parseunit *parse
 	)
 {
+	UNUSED_ARG(parse);
+
 	return true;
 }
 
@@ -2476,6 +2478,8 @@ parse_start(
 	parsectl_t tmp_ctl;
 	u_int type;
 
+	UNUSED_ARG(sysunit);
+
 	/*
 	 * get out Copyright information once
 	 */


=====================================
ntpd/refclock_pcf.c
=====================================
--- a/ntpd/refclock_pcf.c
+++ b/ntpd/refclock_pcf.c
@@ -115,6 +115,8 @@ pcf_shutdown(
 {
 	struct refclockproc *pp;
 	
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	if (NULL != pp)
 		close(pp->io.fd);
@@ -135,6 +137,8 @@ pcf_poll(
 	struct tm tm, *tp;
 	time_t t;
 	
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 
 	buf[0] = 0;


=====================================
ntpd/refclock_spectracom.c
=====================================
--- a/ntpd/refclock_spectracom.c
+++ b/ntpd/refclock_spectracom.c
@@ -217,6 +217,8 @@ spectracom_shutdown(
 	struct refclockproc *	pp;
 	struct spectracomunit *	up;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (-1 != pp->io.fd)
@@ -437,6 +439,8 @@ spectracom_timer(
 	struct peer *peer
 	)
 {
+	UNUSED_ARG(unit);
+
 	register struct spectracomunit *up;
 	struct refclockproc *pp;
 	char	pollchar;	/* character sent to clock */
@@ -487,6 +491,8 @@ spectracom_poll(
 	register struct spectracomunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * Sweep up the samples received since the last poll. If none
 	 * are received, declare a timeout and keep going.
@@ -550,6 +556,10 @@ spectracom_control(
 	register struct spectracomunit *up;
 	struct refclockproc *pp;
 	
+	UNUSED_ARG(unit);
+	UNUSED_ARG(in_st);
+	UNUSED_ARG(out_st);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 


=====================================
ntpd/refclock_true.c
=====================================
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -295,6 +295,8 @@ true_shutdown(
 	register struct true_unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (pp->io.fd != -1)
@@ -837,6 +839,8 @@ true_poll(
 	struct true_unit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * You don't need to poll this clock.  It puts out timecodes
 	 * once per second.  If asked for a timestamp, take note.


=====================================
ntpd/refclock_tsyncpci.c
=====================================
--- a/ntpd/refclock_tsyncpci.c
+++ b/ntpd/refclock_tsyncpci.c
@@ -317,6 +317,7 @@ static bool tsync_start(int unit, struct peer *peer)
     struct refclockproc *pp;
     TsyncUnit           *up;
 
+    UNUSED_ARG(unit);
 
     /*
     **  initialize reference clock and peer parameters
@@ -368,7 +369,8 @@ static bool tsync_start(int unit, struct peer *peer)
 *******************************************************************************/
 static void tsync_shutdown(int unit, struct peer *peer)
 {
-
+    UNUSED_ARG(unit);
+    UNUSED_ARG(peer);
 } /* End - tsync_shutdown() */
 
 /******************************************************************************
@@ -413,6 +415,8 @@ static void tsync_poll(int unit, struct peer *peer)
     ReferenceObj *	 pRefObj;
 
 
+    UNUSED_ARG(unit);
+
     /* Construct the device name */
     snprintf(device, sizeof(device), "%s%d", DEVICE, (int)peer->refclkunit);
 


=====================================
ntpd/refclock_zyfer.c
=====================================
--- a/ntpd/refclock_zyfer.c
+++ b/ntpd/refclock_zyfer.c
@@ -181,6 +181,8 @@ zyfer_shutdown(
 	register struct zyferunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	pp = peer->procptr;
 	up = pp->unitptr;
 	if (pp->io.fd != -1)
@@ -307,6 +309,8 @@ zyfer_poll(
 	register struct zyferunit *up;
 	struct refclockproc *pp;
 
+	UNUSED_ARG(unit);
+
 	/*
 	 * We don't really do anything here, except arm the receiving
 	 * side to capture a sample and check for timeouts.


=====================================
ntpdig/main.c
=====================================
--- a/ntpdig/main.c
+++ b/ntpdig/main.c
@@ -557,6 +557,10 @@ ntpdig_name_resolved(
 	u_int			xmt_delay;
 	size_t			octets;
 
+	UNUSED_ARG(name);
+	UNUSED_ARG(service);
+	UNUSED_ARG(hints);
+
 	xmt_delay_v4 = 0;
 	xmt_delay_v6 = 0;
 	dctx = context;
@@ -645,6 +649,8 @@ queue_xmt(
 	struct timeval	start_cb;
 	struct timeval	delay;
 
+	UNUSED_ARG(dctx);
+
 	dest = &spkt->addr;
 	if (IS_IPV6(dest))
 		pkt_listp = &v6_pkts_list;
@@ -720,6 +726,7 @@ xmt_timer_cb(
 	xmt_ctx *	x;
 
 	UNUSED_ARG(fd);
+	UNUSED_ARG(what);
 	UNUSED_ARG(ctx);
 	DEBUG_INSIST(EV_TIMEOUT == what);
 
@@ -954,6 +961,8 @@ sock_cb(
 	int		rpktl;
 	int		rc;
 
+	UNUSED_ARG(ptr);
+
 	INSIST(sock4 == fd || sock6 == fd);
 
 	TRACE(3, ("sock_cb: event on sock%s:%s%s%s%s\n",
@@ -1102,6 +1111,8 @@ worker_resp_cb(
 {
 	blocking_child *	c;
 
+	UNUSED_ARG(fd);
+	UNUSED_ARG(what);
 	DEBUG_INSIST(EV_READ & what);
 	c = ctx;
 	DEBUG_INSIST(fd == c->resp_read_pipe);
@@ -1149,6 +1160,9 @@ worker_timeout(
 	)
 {
 	UNUSED_ARG(fd);
+#ifndef DEBUG
+	UNUSED_ARG(what);
+#endif /* DEBUG */
 	UNUSED_ARG(ctx);
 
 	DEBUG_REQUIRE(EV_TIMEOUT & what);
@@ -1396,6 +1410,10 @@ offset_calculation(
 	u_fp p_rdly, p_rdsp;
 	double t21, t34, delta;
 
+#ifndef DEBUG
+	UNUSED_ARG(rpktl);
+#endif /* DEBUG */
+
 	/* Convert timestamps from network to host byte order */
 	p_rdly = NTOHS_FP(rpkt->rootdelay);
 	p_rdsp = NTOHS_FP(rpkt->rootdisp);


=====================================
ntpfrob/stepback.c
=====================================
--- a/ntpfrob/stepback.c
+++ b/ntpfrob/stepback.c
@@ -25,6 +25,8 @@ struct timeval adjustment, result;
 static void
 timeout(int sig)
 {
+	(void)sig;
+
 	if (adjtime(&adjustment, &result))
 	    printf("adjtime call failed\n");
 	if (result.tv_sec != 0 || result.tv_usec != 0) {


=====================================
ntpfrob/tickadj.c
=====================================
--- a/ntpfrob/tickadj.c
+++ b/ntpfrob/tickadj.c
@@ -28,6 +28,8 @@ static struct timex txc;
 
 void tickadj(const iomode mode, const int newtick)
 {
+	UNUSED_ARG(mode);
+
 #ifndef HAVE_ADJTIMEX
 	fputs("ntpfrob: \n", stderr);
 	exit(1);


=====================================
ntpq/libntpq.c
=====================================
--- a/ntpq/libntpq.c
+++ b/ntpq/libntpq.c
@@ -59,6 +59,9 @@ int ntpq_stripquotes ( char *resultbuf, char *srcbuf, int datalen, int maxlen )
 {
 	char* tmpbuf = srcbuf;
 
+	UNUSED_ARG(datalen);
+	UNUSED_ARG(maxlen);
+
 	while ( *tmpbuf != 0 )
 	{
 		if ( *tmpbuf == '\"' )


=====================================
ntpq/ntpq-subs.c
=====================================
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -620,6 +620,7 @@ addvars(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(fp);
 	doaddvlist(g_varlist, pcmd->argval[0].string);
 }
 
@@ -634,6 +635,7 @@ rmvars(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(fp);
 	dormvlist(g_varlist, pcmd->argval[0].string);
 }
 
@@ -648,6 +650,8 @@ clearvars(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
+	UNUSED_ARG(fp);
 	doclearvlist(g_varlist);
 }
 
@@ -662,6 +666,7 @@ showvars(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	doprintvlist(g_varlist, fp);
 }
 
@@ -1314,6 +1319,7 @@ associations(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	if (dogetassoc(fp))
 		printassoc(0, fp);
 }
@@ -1329,6 +1335,7 @@ lassociations(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	if (dogetassoc(fp))
 		printassoc(1, fp);
 }
@@ -1344,6 +1351,7 @@ passociations(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	printassoc(0, fp);
 }
 
@@ -1358,6 +1366,7 @@ lpassociations(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	printassoc(1, fp);
 }
 
@@ -2187,6 +2196,8 @@ config (
 	int col;
 	int i;
 
+	UNUSED_ARG(fp);
+
 	cfgcmd = pcmd->argval[0].string;
 
 	if (debug > 2)
@@ -2254,6 +2265,8 @@ config_from_file (
 	int i;
 	int retry_limit;
 
+	UNUSED_ARG(fp);
+
 	if (debug > 2)
 		fprintf(stderr,
 			"In Config\n"
@@ -3315,6 +3328,8 @@ ifstats(
 	bool		comprende;
 	size_t		len;
 
+	UNUSED_ARG(pcmd);
+
 	qres = doquery(CTL_OP_READ_ORDLIST_A, 0, true, 0, NULL, &rstatus,
 		       &dsize, &datap);
 	if (qres)	/* message already displayed */
@@ -3531,6 +3546,8 @@ reslist(
 	int		comprende;
 	size_t		len;
 
+	UNUSED_ARG(pcmd);
+
 	qres = doquery(CTL_OP_READ_ORDLIST_A, 0, true, qdata_chars,
 		       qdata, &rstatus, &dsize, &datap);
 	if (qres)	/* message already displayed */
@@ -3800,6 +3817,7 @@ sysstats(
 	VDC_INIT(NULL,			NULL,			  0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, sysstats_vdc, false, fp);
 }
 
@@ -3831,6 +3849,7 @@ sysinfo(
 	VDC_INIT(NULL,			NULL,		      0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, sysinfo_vdc, true, fp);
 }
 
@@ -3864,6 +3883,7 @@ kerninfo(
 	VDC_INIT(NULL,			NULL,			 0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, kerninfo_vdc, true, fp);
 }
 
@@ -3889,6 +3909,7 @@ monstats(
 	VDC_INIT(NULL,			NULL,			0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, monstats_vdc, false, fp);
 }
 
@@ -3918,6 +3939,7 @@ iostats(
 	VDC_INIT(NULL,			NULL,			  0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, iostats_vdc, false, fp);
 }
 
@@ -3938,6 +3960,7 @@ timerstats(
 	VDC_INIT(NULL,			NULL,		       0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, timerstats_vdc, false, fp);
 }
 
@@ -3964,6 +3987,7 @@ authinfo(
 	VDC_INIT(NULL,			NULL,		     0)
     };
 
+	UNUSED_ARG(pcmd);
 	collect_display_vdc(0, authinfo_vdc, false, fp);
 }
 


=====================================
ntpq/ntpq.c
=====================================
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -1501,6 +1501,8 @@ abortcmd(
 	int sig
 	)
 {
+	UNUSED_ARG(sig);
+
 	if (current_output == stdout)
 	    (void) fflush(stdout);
 	putc('\n', stderr);
@@ -1854,6 +1856,8 @@ getnetnum(
 {
 	struct addrinfo hints, *ai = NULL;
 
+	UNUSED_ARG(af);
+
 	ZERO(hints);
 	hints.ai_flags = AI_CANONNAME;
 #ifdef AI_ADDRCONFIG
@@ -2292,6 +2296,7 @@ ntp_poll(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	(void) fprintf(fp, "poll not implemented yet\n");
 }
 
@@ -2453,6 +2458,8 @@ quit(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
+	UNUSED_ARG(fp);
 	if (havehost)
 	    closesocket(sockfd);	/* cleanliness next to godliness */
 	exit(0);
@@ -2470,6 +2477,7 @@ version(
 	)
 {
 
+	UNUSED_ARG(pcmd);
 	(void) fprintf(fp, "ntpq %s\n", Version);
 	return;
 }
@@ -2484,6 +2492,7 @@ raw(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	rawmode = true;
 	(void) fprintf(fp, "Output set to raw\n");
 }
@@ -2499,6 +2508,7 @@ cooked(
 	FILE *fp
 	)
 {
+	UNUSED_ARG(pcmd);
 	rawmode = false;
 	(void) fprintf(fp, "Output set to cooked\n");
 	return;
@@ -2958,6 +2968,7 @@ rawprint(
 	const char *cp;
 	const char *cpend;
 
+	UNUSED_ARG(datatype);
 	/*
 	 * Essentially print the data as is.  We reformat unprintables, though.
 	 */


=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -414,6 +414,7 @@ pll_trap(
 	int arg
 	)
 {
+    UNUSED_ARG(arg);
 	pll_control--;
 	siglongjmp(env, 1);
 }


=====================================
util/hist.c
=====================================
--- a/util/hist.c
+++ b/util/hist.c
@@ -31,6 +31,9 @@ main(
 	int i, j, n;
 	long t, u, v, w, gtod[NBUF], ovfl[NSRT];
 
+	UNUSED_ARG(argc);
+	UNUSED_ARG(argv);
+
 	/*
 	 * Force pages into memory
 	 */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/12d0c18ec5dbe7504152f15f6f6f8f8ae3a18fa4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151122/46c35f5d/attachment.html>


More information about the vc mailing list