Quash a load of compile warnings

Kevin Lyda writes:
I enclose the following patch which removes all but three of the warnings.  i
don't have any non-linux systems handy to test a fix to the round() function.
but having it return a double should be fine.

It doesn't actually fix anything, it just shuts up -Wall, so it's certainly an
optional type of patch.
This commit is contained in:
kevin lyda
2006-04-14 17:48:43 +01:00
committed by Richard P. Curnow
parent 3a8f93792b
commit 2a30c56f03
10 changed files with 13 additions and 13 deletions

View File

@@ -378,7 +378,7 @@ generate_packet_auth(NTP_Packet *pkt, unsigned long keyid)
if (keyok) {
pkt->auth_keyid = htonl(keyid);
MD5Init(&ctx);
MD5Update(&ctx, keytext, keylen);
MD5Update(&ctx, (unsigned char *) keytext, keylen);
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
MD5Final(&ctx);
memcpy(&(pkt->auth_data), &ctx.digest, 16);
@@ -447,7 +447,7 @@ check_packet_auth(NTP_Packet *pkt, unsigned long keyid)
if (keyok) {
pkt->auth_keyid = htonl(keyid);
MD5Init(&ctx);
MD5Update(&ctx, keytext, keylen);
MD5Update(&ctx, (unsigned char *) keytext, keylen);
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
MD5Final(&ctx);
if (!memcmp((void *) &ctx.digest, (void *) &(pkt->auth_data), 16)) {