Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/sys/crypto Turn on WARNS to 4, so that magically -st...
details: https://anonhg.NetBSD.org/src/rev/c8e08fa07419
branches: trunk
changeset: 764966:c8e08fa07419
user: christos <christos%NetBSD.org@localhost>
date: Sat May 14 16:26:23 2011 +0000
description:
Turn on WARNS to 4, so that magically -std=gnu99 gets turned on and fix
the few warnings. Since the kernel uses c99, this makes kernel code that
uses c99 features compile.
diffstat:
regress/sys/crypto/Makefile.inc | 4 ++--
regress/sys/crypto/blowfish/bftest.c | 7 ++++---
regress/sys/crypto/rijndael/rijndaeltest.c | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 2947da4548e4 -r c8e08fa07419 regress/sys/crypto/Makefile.inc
--- a/regress/sys/crypto/Makefile.inc Sat May 14 16:17:55 2011 +0000
+++ b/regress/sys/crypto/Makefile.inc Sat May 14 16:26:23 2011 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile.inc,v 1.7 2002/09/18 04:16:01 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.8 2011/05/14 16:26:23 christos Exp $
# $KAME: Makefile.inc,v 1.3 2000/11/08 05:58:24 itojun Exp $
.if !target(regress)
.include <bsd.own.mk>
SYSDIR= ${NETBSDSRCDIR}/sys
-WARNS?= 1
+WARNS?= 4
regress:
@./${PROG}
diff -r 2947da4548e4 -r c8e08fa07419 regress/sys/crypto/blowfish/bftest.c
--- a/regress/sys/crypto/blowfish/bftest.c Sat May 14 16:17:55 2011 +0000
+++ b/regress/sys/crypto/blowfish/bftest.c Sat May 14 16:26:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bftest.c,v 1.5 2005/02/06 06:05:19 perry Exp $ */
+/* $NetBSD: bftest.c,v 1.6 2011/05/14 16:26:23 christos Exp $ */
/* $KAME: bftest.c,v 1.3 2000/11/08 05:58:24 itojun Exp $ */
/*
@@ -97,7 +97,7 @@
#include <crypto/blowfish/blowfish.h>
-static char *bf_key[2]={
+static const char *bf_key[2]={
"abcdefghijklmnopqrstuvwxyz",
"Who is John Galt?"
};
@@ -165,7 +165,8 @@
printf("testing blowfish in raw ecb mode\n");
again:
for (n = 0; n < 2; n++) {
- BF_set_key(&key, strlen(bf_key[n]), (unsigned char *)bf_key[n]);
+ BF_set_key(&key, strlen(bf_key[n]),
+ (const unsigned char *)bf_key[n]);
hex2bin((u_int8_t *)plain, bf_plain[n]);
hex2bin((u_int8_t *)cipher, bf_cipher[n]);
diff -r 2947da4548e4 -r c8e08fa07419 regress/sys/crypto/rijndael/rijndaeltest.c
--- a/regress/sys/crypto/rijndael/rijndaeltest.c Sat May 14 16:17:55 2011 +0000
+++ b/regress/sys/crypto/rijndael/rijndaeltest.c Sat May 14 16:26:23 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rijndaeltest.c,v 1.7 2006/05/12 01:56:39 mrg Exp $ */
+/* $NetBSD: rijndaeltest.c,v 1.8 2011/05/14 16:26:23 christos Exp $ */
/* $KAME: rijndaeltest.c,v 1.7 2001/05/27 01:56:45 itojun Exp $ */
/*
@@ -92,7 +92,7 @@
size_t l;
const char *s;
{
- int i;
+ size_t i;
u_int v;
for (i = 0; i < l && *s; i++) {
Home |
Main Index |
Thread Index |
Old Index