summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-11-02 18:00:40 +0000
committerGreg Hudson <ghudson@mit.edu>2009-11-02 18:00:40 +0000
commit5bf926ba4c8047b5dec75be2277d5f9b78fc04c2 (patch)
tree31aaaf73a3ccb55e3ec4a67d710203253fb2294c /src/lib/crypto
parent36d48179639fcf05a250ed973eaebfa3d4348a25 (diff)
Clean up a bunch of signed/unsigned comparison warnings
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto')
-rw-r--r--src/lib/crypto/builtin/yhash.h2
-rw-r--r--src/lib/crypto/krb/yarrow/yarrow.c5
-rw-r--r--src/lib/crypto/krb/yarrow/yarrow.h4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/crypto/builtin/yhash.h b/src/lib/crypto/builtin/yhash.h
index ee4f03eb23..ce78c56f86 100644
--- a/src/lib/crypto/builtin/yhash.h
+++ b/src/lib/crypto/builtin/yhash.h
@@ -15,7 +15,7 @@
#define HASH_Init(x) shsInit(x)
#define HASH_Update(x, buf, sz) shsUpdate(x, (const void*)buf, sz)
#define HASH_Final(x, tdigest) do { \
- int loopvar; \
+ size_t loopvar; \
unsigned char *out2 = (void *)(tdigest); \
HASH_CTX *ctx = (x); \
shsFinal(ctx); \
diff --git a/src/lib/crypto/krb/yarrow/yarrow.c b/src/lib/crypto/krb/yarrow/yarrow.c
index 4b1fcf1dce..66a5fe45a2 100644
--- a/src/lib/crypto/krb/yarrow/yarrow.c
+++ b/src/lib/crypto/krb/yarrow/yarrow.c
@@ -462,7 +462,7 @@ int krb5int_yarrow_status( Yarrow_CTX* y, int *num_sources, unsigned *source_id,
EXCEP_DECL;
int num = y->slow_k_of_n_thresh;
int source = -1;
- int emax = y->slow_thresh;
+ size_t emax = y->slow_thresh;
size_t entropy = 0;
unsigned i;
@@ -929,7 +929,8 @@ YARROW_DLL
const char* krb5int_yarrow_str_error( int err )
{
err = 1-err;
- if ( err < 0 || err >= sizeof( yarrow_str_error ) / sizeof( char* ) )
+ if ( err < 0 ||
+ (unsigned int) err >= sizeof( yarrow_str_error ) / sizeof( char* ) )
{
err = 1-YARROW_FAIL;
}
diff --git a/src/lib/crypto/krb/yarrow/yarrow.h b/src/lib/crypto/krb/yarrow/yarrow.h
index 081a06ba57..3cf50fdea1 100644
--- a/src/lib/crypto/krb/yarrow/yarrow.h
+++ b/src/lib/crypto/krb/yarrow/yarrow.h
@@ -121,8 +121,8 @@ typedef struct
int slow_k_of_n;
/* current thresholds */
- int slow_thresh;
- int fast_thresh;
+ size_t slow_thresh;
+ size_t fast_thresh;
int slow_k_of_n_thresh;
} Yarrow_CTX;