conversion related troubles (int, size_t, ptrdiff_t ..)

This commit is contained in:
Karel Miko
2017-02-28 11:30:19 +01:00
parent 8141ca617a
commit 88412a9fc2
7 changed files with 15 additions and 11 deletions
+3 -2
View File
@@ -35,7 +35,8 @@ int f9_file(int cipher,
#ifdef LTC_NO_FILE
return CRYPT_NOP;
#else
int err, x;
size_t x;
int err;
f9_state f9;
FILE *in;
unsigned char buf[512];
@@ -57,7 +58,7 @@ int f9_file(int cipher,
do {
x = fread(buf, 1, sizeof(buf), in);
if ((err = f9_process(&f9, buf, x)) != CRYPT_OK) {
if ((err = f9_process(&f9, buf, (unsigned long)x)) != CRYPT_OK) {
fclose(in);
return err;
}
+3 -2
View File
@@ -35,7 +35,8 @@ int omac_file(int cipher,
#ifdef LTC_NO_FILE
return CRYPT_NOP;
#else
int err, x;
size_t x;
int err;
omac_state omac;
FILE *in;
unsigned char buf[512];
@@ -57,7 +58,7 @@ int omac_file(int cipher,
do {
x = fread(buf, 1, sizeof(buf), in);
if ((err = omac_process(&omac, buf, x)) != CRYPT_OK) {
if ((err = omac_process(&omac, buf, (unsigned long)x)) != CRYPT_OK) {
fclose(in);
return err;
}
+3 -2
View File
@@ -35,7 +35,8 @@ int pmac_file(int cipher,
#ifdef LTC_NO_FILE
return CRYPT_NOP;
#else
int err, x;
size_t x;
int err;
pmac_state pmac;
FILE *in;
unsigned char buf[512];
@@ -58,7 +59,7 @@ int pmac_file(int cipher,
do {
x = fread(buf, 1, sizeof(buf), in);
if ((err = pmac_process(&pmac, buf, x)) != CRYPT_OK) {
if ((err = pmac_process(&pmac, buf, (unsigned long)x)) != CRYPT_OK) {
fclose(in);
return err;
}
+3 -2
View File
@@ -35,7 +35,8 @@ int xcbc_file(int cipher,
#ifdef LTC_NO_FILE
return CRYPT_NOP;
#else
int err, x;
size_t x;
int err;
xcbc_state xcbc;
FILE *in;
unsigned char buf[512];
@@ -57,7 +58,7 @@ int xcbc_file(int cipher,
do {
x = fread(buf, 1, sizeof(buf), in);
if ((err = xcbc_process(&xcbc, buf, x)) != CRYPT_OK) {
if ((err = xcbc_process(&xcbc, buf, (unsigned long)x)) != CRYPT_OK) {
fclose(in);
return err;
}