From: Ben Pfaff Date: Tue, 24 May 2011 17:56:11 +0000 (-0700) Subject: sha1: Avoid unused variable warnings on big-endian systems. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee693ba0850c5201830f22c645f6c5a06fa4180e;p=openvswitch sha1: Avoid unused variable warnings on big-endian systems. --- diff --git a/lib/sha1.c b/lib/sha1.c index 3b16622d..cdccab3b 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -33,6 +33,7 @@ #include "sha1.h" #include #include +#include "compiler.h" #include "util.h" /* a bit faster & bigger, if defined */ @@ -150,12 +151,12 @@ sha_transform(struct sha1_ctx *sha_info) /* 'count' is the number of bytes to do an endian flip. */ static void -maybe_byte_reverse(uint32_t *buffer, int count) +maybe_byte_reverse(uint32_t *buffer OVS_UNUSED, int count OVS_UNUSED) { +#if !WORDS_BIGENDIAN int i; uint8_t ct[4], *cp; -#if !WORDS_BIGENDIAN count /= sizeof(uint32_t); cp = (uint8_t *) buffer; for (i = 0; i < count; i++) {