mirror of https://github.com/BOINC/boinc.git
crypt_prog: fix warnings.
- fix issue with variable shadowing - fix int <-> size_t conversion warning - fix size_t <-> unsigned int conversion warning Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
This commit is contained in:
parent
f0b6468925
commit
421bc875c5
|
@ -86,7 +86,7 @@ void usage() {
|
|||
}
|
||||
|
||||
unsigned int random_int() {
|
||||
unsigned int n;
|
||||
unsigned int n = 0;
|
||||
#if defined(_WIN32)
|
||||
#if defined(__CYGWIN32__)
|
||||
HMODULE hLib=LoadLibrary((const char *)"ADVAPI32.DLL");
|
||||
|
@ -238,8 +238,8 @@ int main(int argc, char** argv) {
|
|||
if (retval) die("read_public_key");
|
||||
f = fopen(argv[3], "r");
|
||||
if (!f) die("fopen");
|
||||
int n = fread(cbuf, 1, 256, f);
|
||||
cbuf[n] = 0;
|
||||
size_t k = fread(cbuf, 1, 256, f);
|
||||
cbuf[k] = 0;
|
||||
|
||||
retval = check_string_signature(argv[2], cbuf, public_key, is_valid);
|
||||
if (retval) die("check_string_signature");
|
||||
|
@ -264,7 +264,7 @@ int main(int argc, char** argv) {
|
|||
if (retval) die("read_public_key");
|
||||
strcpy((char*)buf2, "encryption test successful");
|
||||
in.data = buf2;
|
||||
in.len = strlen((char*)in.data);
|
||||
in.len = static_cast<unsigned int>(strlen((char*)in.data));
|
||||
out.data = buf;
|
||||
encrypt_private(private_key, in, out);
|
||||
in = out;
|
||||
|
|
Loading…
Reference in New Issue