[ovs-dev] [sparc 2/5] sha1: Avoid unused variable warnings on big-endian systems.

Justin Pettit jpettit at nicira.com
Thu May 26 08:49:42 UTC 2011


Looks good.

--Justin


On May 24, 2011, at 11:21 AM, Ben Pfaff wrote:

> ---
> lib/sha1.c |    5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/sha1.c b/lib/sha1.c
> index 3b16622..cdccab3 100644
> --- a/lib/sha1.c
> +++ b/lib/sha1.c
> @@ -33,6 +33,7 @@
> #include "sha1.h"
> #include <ctype.h>
> #include <string.h>
> +#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++) {
> -- 
> 1.6.5
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev




More information about the dev mailing list