conversion related troubles (int, size_t, ptrdiff_t ..)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user