From owner-freebsd-current Sat May 11 9:34:52 2002 Delivered-To: freebsd-current@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id A313637B407 for ; Sat, 11 May 2002 09:34:46 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id EB435535E; Sat, 11 May 2002 18:34:44 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: hiten@uk.FreeBSD.org Cc: current@FreeBSD.org Subject: Re: alpha tinderbox failure References: <20020511161441.GA1568@hpdi.ath.cx> From: Dag-Erling Smorgrav Date: 11 May 2002 18:34:44 +0200 In-Reply-To: <20020511161441.GA1568@hpdi.ath.cx> Message-ID: Lines: 53 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hiten Pandya writes: > > ===> libtelnet > > cc1: warnings being treated as errors > > /.amd_mnt/freefall/host/d/home/des/tinderbox/src/crypto/telnet/libtelnet/kerberos.c: In function > > `kerberos4_cksum': > > /.amd_mnt/freefall/host/d/home/des/tinderbox/src/crypto/telnet/libtelnet/kerberos.c:496: warning: > > unreachable code at beginning of switch statement > > *** Error code 1 > > > %%% > int > kerberos4_cksum(unsigned char *d, int n) > { > int ck = 0; > > /* > * A comment is probably needed here for those not > * well versed in the "C" language. Yes, this is > * supposed to be a "switch" with the body of the > * "switch" being a "while" statement. The whole > * purpose of the switch is to allow us to jump into > * the middle of the while() loop, and then not have > * to do any more switch()s. > * > * Some compilers will spit out a warning message > * about the loop not being entered at the top. > */ > switch (n&03) > while (n > 0) { > case 0: > ck ^= (int)*d++ << 24; > --n; > case 3: > ck ^= (int)*d++ << 16; > --n; > case 2: > ck ^= (int)*d++ << 8; > --n; > case 1: > ck ^= (int)*d++; > --n; > } > return(ck); > } > %%% Hmm, does this mean Duff's Device is not valid C? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message