From: Marc Dionne Date: Tue, 10 Nov 2009 23:36:55 +0000 (-0500) Subject: krb_udp.c warning fix X-Git-Tag: openafs-devel-1_5_67~67 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d616d1ee99794525aa2d778d11552c1986007ebb krb_udp.c warning fix This file generates a warning because the left side of a variable assignment is commented out. Keep the effect of the line (incrementing packet) but remove the unused casting and reference, and remove the comments that date from the original IBM source. Leave a new comment in place in case the information is useful. Adjust the Makefile and README.WARNINGS to account for the change. Change-Id: I944e1c488e39411d32d700cba2d3ef567eddddb4 Reviewed-on: http://gerrit.openafs.org/804 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/README.WARNINGS b/README.WARNINGS index 651ae3f..a449d95 100644 --- a/README.WARNINGS +++ b/README.WARNINGS @@ -59,7 +59,6 @@ butc/tcudbprocs.c : all : ubik_Call butc/dump.c : all : pointer types (XXX) comerr/error_table.c : all : Autogenerated file with unused labels kauth/kaserver.c : all : ExtendedCellInfo -kauth/krb_udp.c : all : "Value computed is not used" - wierd kauth/admin_tools.c : all : ubik_Call nonsense kauth/authclient.c : strict-proto : ubik_Call nonsense : all : ubik_Call nonsense diff --git a/src/kauth/Makefile.in b/src/kauth/Makefile.in index 79862e6..455d1ae 100644 --- a/src/kauth/Makefile.in +++ b/src/kauth/Makefile.in @@ -221,7 +221,7 @@ kdb: kdb.o ${INCLS} ${LIBS} libkauth.a kdb.o: kdb.c AFS_component_version_number.o krb_udp.o: krb_udp.c kaserver.h kautils.h kauth.h prot.h ${TOP_INCDIR}/lwp.h AFS_component_version_number.o - $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $< + $(CC) $(CFLAGS) -c $< krb_udp: krb_udp.o libkauth.a $(KLIBS) ${CC} ${LDFLAGS} -o krb_udp krb_udp.o libkauth.a $(KLIBS) diff --git a/src/kauth/krb_udp.c b/src/kauth/krb_udp.c index a8318dd..7d516cf 100644 --- a/src/kauth/krb_udp.c +++ b/src/kauth/krb_udp.c @@ -219,7 +219,6 @@ check_auth(struct packet *pkt, char *auth, int authLen, char *packet; des_key_schedule schedule; afs_int32 cksum; - /* unsigned char time_msec; */ afs_int32 time_sec; int byteOrder = pkt->byteOrder; @@ -236,7 +235,8 @@ check_auth(struct packet *pkt, char *auth, int authLen, return KABADTICKET; packet += strlen(packet) + 1; getint(cksum); - /* time_msec = */ *(unsigned char *)packet++; + /* Comments in the original IBM source suggest this byte was/is "time_msec" */ + packet++; getint(time_sec); if ((packet - auth) > authLen) return KABADTICKET;