diff options
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/aes.cc | 4 | ||||
-rw-r--r-- | libtests/ascii85.cc | 2 | ||||
-rw-r--r-- | libtests/bits.cc | 2 | ||||
-rw-r--r-- | libtests/hex.cc | 2 | ||||
-rw-r--r-- | libtests/lzw.cc | 2 | ||||
-rw-r--r-- | libtests/md5.cc | 2 | ||||
-rw-r--r-- | libtests/rc4.cc | 6 |
7 files changed, 10 insertions, 10 deletions
diff --git a/libtests/aes.cc b/libtests/aes.cc index 418c3297..ad2f0dd8 100644 --- a/libtests/aes.cc +++ b/libtests/aes.cc @@ -46,7 +46,7 @@ int main(int argc, char* argv[]) usage(); } - unsigned int hexkeylen = strlen(hexkey); + unsigned int hexkeylen = (unsigned int)strlen(hexkey); unsigned int keylen = hexkeylen / 2; if (keylen != Pl_AES_PDF::key_size) { @@ -93,7 +93,7 @@ int main(int argc, char* argv[]) bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), infile); + size_t len = fread(buf, 1, sizeof(buf), infile); if (len <= 0) { done = true; diff --git a/libtests/ascii85.cc b/libtests/ascii85.cc index 497df79a..7fd7f69b 100644 --- a/libtests/ascii85.cc +++ b/libtests/ascii85.cc @@ -15,7 +15,7 @@ int main() bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), stdin); + size_t len = fread(buf, 1, sizeof(buf), stdin); if (len <= 0) { done = true; diff --git a/libtests/bits.cc b/libtests/bits.cc index b1857988..7837ac68 100644 --- a/libtests/bits.cc +++ b/libtests/bits.cc @@ -46,7 +46,7 @@ print_buffer(Pl_Buffer* bp) bp->finish(); Buffer* b = bp->getBuffer(); unsigned char const* p = b->getBuffer(); - unsigned long l = b->getSize(); + size_t l = b->getSize(); for (unsigned long i = 0; i < l; ++i) { printf("%02x%s", (unsigned int)(p[i]), diff --git a/libtests/hex.cc b/libtests/hex.cc index 0a08fcb8..4e3eefde 100644 --- a/libtests/hex.cc +++ b/libtests/hex.cc @@ -15,7 +15,7 @@ int main() bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), stdin); + size_t len = fread(buf, 1, sizeof(buf), stdin); if (len <= 0) { done = true; diff --git a/libtests/lzw.cc b/libtests/lzw.cc index 5bfdbbd5..6fd8ca91 100644 --- a/libtests/lzw.cc +++ b/libtests/lzw.cc @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), infile); + size_t len = fread(buf, 1, sizeof(buf), infile); if (len <= 0) { done = true; diff --git a/libtests/md5.cc b/libtests/md5.cc index 9b1ae483..ed6a7d7a 100644 --- a/libtests/md5.cc +++ b/libtests/md5.cc @@ -54,7 +54,7 @@ int main(int, char*[]) bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), f); + size_t len = fread(buf, 1, sizeof(buf), f); if (len <= 0) { done = true; diff --git a/libtests/rc4.cc b/libtests/rc4.cc index 8f809ec1..1328fc85 100644 --- a/libtests/rc4.cc +++ b/libtests/rc4.cc @@ -17,8 +17,8 @@ int main(int argc, char* argv[]) char* hexkey = argv[1]; char* infilename = argv[2]; char* outfilename = argv[3]; - int hexkeylen = strlen(hexkey); - int keylen = hexkeylen / 2; + unsigned int hexkeylen = (unsigned int)strlen(hexkey); + unsigned int keylen = hexkeylen / 2; unsigned char* key = new unsigned char[keylen + 1]; key[keylen] = '\0'; @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) bool done = false; while (! done) { - int len = fread(buf, 1, sizeof(buf), infile); + size_t len = fread(buf, 1, sizeof(buf), infile); if (len <= 0) { done = true; |