summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2011-03-06 13:30:35 +0000
committerEzra Peisach <epeisach@mit.edu>2011-03-06 13:30:35 +0000
commit2b86fff827841f960a6f3fc61cbaba0895ad3ceb (patch)
tree037b99f62fe5dfc58ff50eebac82e33066a5077b
parent779f6b94a549f2f433babfb576e59db75d2d7375 (diff)
downloadkrb5-2b86fff827841f960a6f3fc61cbaba0895ad3ceb.tar.gz
krb5-2b86fff827841f960a6f3fc61cbaba0895ad3ceb.tar.xz
krb5-2b86fff827841f960a6f3fc61cbaba0895ad3ceb.zip
Fix up signed/unsigned warnings in this directory. There are still
a few more - but these were the obvious ones. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24689 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/crypto/crypto_tests/t_crc.c6
-rw-r--r--src/lib/crypto/crypto_tests/t_cts.c6
-rw-r--r--src/lib/crypto/crypto_tests/t_hmac.c4
-rw-r--r--src/lib/crypto/crypto_tests/t_mddriver.c2
-rw-r--r--src/lib/crypto/crypto_tests/t_nfold.c6
5 files changed, 13 insertions, 11 deletions
diff --git a/src/lib/crypto/crypto_tests/t_crc.c b/src/lib/crypto/crypto_tests/t_crc.c
index d8b0ea74f..500e020c4 100644
--- a/src/lib/crypto/crypto_tests/t_crc.c
+++ b/src/lib/crypto/crypto_tests/t_crc.c
@@ -105,11 +105,12 @@ struct crc_trial trials[] = {
#define NTRIALS (sizeof(trials) / sizeof(trials[0]))
+#if 0
static void
timetest(unsigned int nblk, unsigned int blksiz)
{
char *block;
- int i;
+ unsigned int i;
struct tms before, after;
unsigned long cksum;
@@ -135,6 +136,7 @@ timetest(unsigned int nblk, unsigned int blksiz)
free(block);
}
+#endif
static void gethexstr(char *data, size_t *outlen, unsigned char *outbuf,
size_t buflen)
@@ -158,7 +160,7 @@ static void gethexstr(char *data, size_t *outlen, unsigned char *outbuf,
static void
verify(void)
{
- int i;
+ unsigned int i;
struct crc_trial trial;
unsigned char buf[4];
size_t len;
diff --git a/src/lib/crypto/crypto_tests/t_cts.c b/src/lib/crypto/crypto_tests/t_cts.c
index 90155f780..39aef9d84 100644
--- a/src/lib/crypto/crypto_tests/t_cts.c
+++ b/src/lib/crypto/crypto_tests/t_cts.c
@@ -75,7 +75,7 @@ check_error (int r, int line) {
#endif
static void printd (const char *descr, krb5_data *d) {
- int i, j;
+ unsigned int i, j;
const int r = 16;
printf("%s:", descr);
@@ -98,7 +98,7 @@ static void printd (const char *descr, krb5_data *d) {
}
static void printk(const char *descr, krb5_keyblock *k) {
krb5_data d;
- d.data = k->contents;
+ d.data = (char *) k->contents;
d.length = k->length;
printd(descr, &d);
}
@@ -110,7 +110,7 @@ static void test_cts()
static const unsigned char aeskey[16] = "chicken teriyaki";
static const int lengths[] = { 17, 31, 32, 47, 48, 64 };
- int i;
+ unsigned int i;
char outbuf[64], encivbuf[16], decivbuf[16];
krb5_crypto_iov iov;
krb5_data in, enciv, deciv;
diff --git a/src/lib/crypto/crypto_tests/t_hmac.c b/src/lib/crypto/crypto_tests/t_hmac.c
index ec49d615d..1f5cae596 100644
--- a/src/lib/crypto/crypto_tests/t_hmac.c
+++ b/src/lib/crypto/crypto_tests/t_hmac.c
@@ -57,7 +57,7 @@ static void check_error (int r, int line) {
#endif
static void printd (const char *descr, krb5_data *d) {
- int i, j;
+ unsigned int i, j;
const int r = 16;
printf("%s (%d bytes):", descr, d->length);
@@ -139,7 +139,7 @@ static void test_hmac()
char outbuf[20];
char stroutbuf[80];
krb5_error_code err;
- int i, j;
+ unsigned int i, j;
int lose = 0;
struct k5buf buf;
diff --git a/src/lib/crypto/crypto_tests/t_mddriver.c b/src/lib/crypto/crypto_tests/t_mddriver.c
index 68435139c..59b4a48de 100644
--- a/src/lib/crypto/crypto_tests/t_mddriver.c
+++ b/src/lib/crypto/crypto_tests/t_mddriver.c
@@ -202,7 +202,7 @@ static void MDTestSuite ()
{
#ifdef HAVE_TEST_SUITE
struct md_test_entry *entry;
- int i, num_tests = 0, num_failed = 0;
+ int num_tests = 0, num_failed = 0;
unsigned char digest[16];
printf ("MD%d test suite:\n\n", MD);
diff --git a/src/lib/crypto/crypto_tests/t_nfold.c b/src/lib/crypto/crypto_tests/t_nfold.c
index 6a8e7f725..f9e36e57f 100644
--- a/src/lib/crypto/crypto_tests/t_nfold.c
+++ b/src/lib/crypto/crypto_tests/t_nfold.c
@@ -51,7 +51,7 @@ static void printstringhex (const unsigned char *p) {
static void rfc_tests ()
{
- int i;
+ unsigned i;
struct {
char *input;
unsigned int n;
@@ -101,7 +101,7 @@ static void rfc_tests ()
static void fold_kerberos(unsigned int nbytes)
{
unsigned char cipher_text[300];
- int j;
+ unsigned int j;
if (nbytes > 300)
abort();
@@ -136,7 +136,7 @@ main(argc, argv)
char *argv[];
{
unsigned char cipher_text[64];
- int i, j;
+ unsigned int i, j;
printf("N-fold\n");
for (i=0; i<sizeof(nfold_in)/sizeof(char *); i++) {