Replied: Sun, 04 May 1997 02:13:37 -0400
Replied: "Ulrich.Windl@rz.uni-regensburg.de "
Received: from copland.udel.edu by huey.udel.edu id aa03820; 11 Apr 97 7:31 EDT
Received: from comsun.rz.uni-regensburg.de (comsun.rz.uni-regensburg.de [132.199.1.163]) by copland.udel.edu (8.8.5/8.7.3) with SMTP id HAA29377 for <mills@udel.edu>; Fri, 11 Apr 1997 07:31:13 -0400 (EDT)
Received: from ngate.ngate.uni-regensburg.de (ngate.rz.uni-regensburg.de) by comsun.rz.uni-regensburg.de with SMTP id AA12280
  (5.65c/IDA-1.4.4 for <mills@udel.edu>); Fri, 11 Apr 1997 13:31:08 +0200
Received: from rz.uni-regensburg.de by ngate.ngate.uni-regensburg.de; Fri, 11 Apr 97 12:31 MET
Received: from rz.uni-regensburg.de by kgate.ngate.uni-regensburg.de; Fri, 11 Apr 97 11:29 GMT
Received: from localhost by rkdvmhp1.dvm.klinik.uni-regensburg.de with SMTP
	(1.40.112.8/16.2-961007-2) id AA153688255; Fri, 11 Apr 1997 13:30:55 +0200
Date: Fri, 11 Apr 1997 13:30:55 +0200 (MESZ)
From: Ulrich Windl <windl@rkdvmhp1.dvm.klinik.uni-regensburg.de>
Reply-To: Ulrich.Windl@rz.uni-regensburg.de
To: David Mills <mills@udel.edu>
Subject: xntp3-5.90: compiler warnings
Message-Id: <Pine.HPP.3.94.970411130914.14395A-100000@rkdvmhp1.dvm.klinik.uni-regensburg.de>
X-Pgp-Key: 0x[E8]43660D
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dave,

possibly you better forward the stuff below to Harlan, as it's almost all
non-critical to the performance; only exception is

ntp_loopfilter.c:570: warning: suggest parentheses around + or - inside shift:
adjustment = -(-adjustment >> CLOCK_PHASE + time_constant);

This can be a real problem! Another thing seems to be reordering of
"volatile".

Ulrich Windl
------------------- cut here --------------------

I'm just compiling xntp3-5.90 on HP-UX 10.10 with gcc-2.7.2.1 and option
"-W". I get some compiler warnings that might interest you:

authkeys.c: In function `MD5auth_setkey':
authkeys.c:419: warning: comparison between signed and unsigned
authkeys.c:445: warning: comparison between signed and unsigned

modetoa.c: In function `modetoa':
modetoa.c:26: warning: comparison between signed and unsigned

msyslog.c: In function `msyslog':
msyslog.c:113: warning: comparison between signed and unsigned

findconfig.c: In function `FindConfig':
findconfig.c:28: warning: implicit declaration of function `gethostname'

(Including <unistd.h> should solve this)

parse.c: In function `setup_bitmaps':
parse.c:176: warning: implicit declaration of function `bzero'
parse.c: In function `parse_ioread':
parse.c:461: warning: implicit declaration of function `bcopy'

(For modern systems "memset" should replace "bzero", and "memcpy" or
"memmove" should replace "bcopy". Anyway, <stings.h> supplies there here)

ntpdate.c: In function `receive':
ntpdate.c:612: warning: comparison between signed and unsigned

ntpq.c: In function `getresponse':
ntpq.c:853: warning: comparison between signed and unsigned
ntpq.c:894: warning: comparison between signed and unsigned
ntpq.c: In function `sendrequest':
ntpq.c:1055: warning: comparison between signed and unsigned
ntpq.c:1057: warning: comparison between signed and unsigned
ntpq.c:2005: warning: comparison between signed and unsigned
ntpq.c: In function `passwd':
ntpq.c:2055: warning: comparison between signed and unsigned
ntpq.c:2057: warning: comparison between signed and unsigned

ntptrace.c: In function `ReceiveBuf':
ntptrace.c:389: warning: comparison between signed and unsigned

ntp_control.c: In function `process_control':
ntp_control.c:614: warning: comparison between signed and unsigned
ntp_control.c:614: warning: comparison between signed and unsigned

ntp_io.c:116: warning: `static' is not at beginning of declaration
ntp_io.c:117: warning: `static' is not at beginning of declaration
ntp_io.c:118: warning: `static' is not at beginning of declaration

(static should go first)

ntp_io.c: In function `init_io':
ntp_io.c:210: warning: assignment discards `volatile' from pointer
target type
ntp_io.c: In function `getrecvbufs':
ntp_io.c:1127: warning: assignment discards `volatile' from pointer target type
ntp_io.c:1148: warning: assignment discards `volatile' from pointer target type
ntp_io.c: In function `freerecvbuf':
ntp_io.c:1175: warning: assignment discards `volatile' from pointer target type
ntp_io.c: In function `input_handler':
ntp_io.c:1399: warning: assignment discards `volatile' from pointer target type
ntp_io.c:1404: warning: comparison between signed and unsigned
ntp_io.c:1418: warning: assignment discards `volatile' from pointer target type
ntp_io.c:1536: warning: assignment discards `volatile' from pointer target type

ntp_loopfilter.c: In function `local_clock':
ntp_loopfilter.c:462: warning: comparison between signed and unsigned
ntp_loopfilter.c: In function `adj_host_clock':
ntp_loopfilter.c:570: warning: suggest parentheses around + or - inside shift

(line is ``adjustment = -(-adjustment >> CLOCK_PHASE + time_constant);'')

ntp_proto.c: In function `receive':
ntp_proto.c:493: warning: comparison between signed and unsigned
ntp_proto.c: In function `fast_xmit':
ntp_proto.c:2171: warning: comparison between signed and unsigned

ntp_request.c: In function `init_request':
ntp_request.c:256: warning: comparison between signed and unsigned
ntp_request.c: In function `process_private':
ntp_request.c:460: warning: comparison between signed and unsigned
ntp_request.c:460: warning: comparison between signed and unsigned
ntp_request.c:525: warning: comparison between signed and unsigned
ntp_request.c:580: warning: comparison between signed and unsigned
ntp_request.c: In function `io_stats':
ntp_request.c:1053: warning: `extern' is not at beginning of declaration
ntp_request.c:1054: warning: `extern' is not at beginning of declaration
ntp_request.c:1057: warning: `extern' is not at beginning of declaration
ntp_request.c:1058: warning: `extern' is not at beginning of declaration
ntp_request.c:1059: warning: `extern' is not at beginning of declaration
ntp_request.c:1062: warning: `extern' is not at beginning of declaration
ntp_request.c:1063: warning: `extern' is not at beginning of declaration

ntpd.c: In function `main':
ntpd.c:239: warning: comparison between signed and unsigned

refclock_parse.c:400: warning: `NO_FLAGS' redefined
refclock_parse.c: In function `clear_err':
refclock_parse.c:1165: warning: comparison between signed and unsigned
refclock_parse.c: In function `stream_poll':
refclock_parse.c:1731: warning: comparison between signed and unsigned
refclock_parse.c:1877: warning: comparison between signed and unsigned
refclock_parse.c: In function `clockstatus':
refclock_parse.c:2393: warning: comparison between signed and unsigned
refclock_parse.c: In function `parse_start':
refclock_parse.c:2680: warning: comparison between signed and unsigned
refclock_parse.c: In function `trimbletaip_event':
refclock_parse.c:3974: warning: comparison between signed and unsigned




