cppchecker fixes
This commit is contained in:
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
nfc3d_amiibo_keys amiiboKeys;
|
||||
nfc3d_amiibo_keys amiiboKeys = {0};
|
||||
if (! LoadAmiikey(amiiboKeys, keyfile))
|
||||
return 5;
|
||||
|
||||
@@ -136,7 +136,7 @@ int main(int argc, char **argv) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
size_t readPages = fread(original, 4, NTAG215_SIZE / 4, f);
|
||||
readPages = fread(original, 4, NTAG215_SIZE / 4, f);
|
||||
if (readPages < NFC3D_AMIIBO_SIZE / 4) {
|
||||
fprintf(stderr, "Could not read from save\n");
|
||||
fclose(f);
|
||||
|
||||
@@ -185,7 +185,7 @@ static char *read_string(scanner_t *s, va_list *ap,
|
||||
length = va_arg(*ap, size_t);
|
||||
} else {
|
||||
prev_token(s);
|
||||
length = s->has_error ? 0 : strlen(str);
|
||||
length = s->has_error == 1 ? 0 : strlen(str);
|
||||
}
|
||||
|
||||
if (!s->has_error && strbuffer_append_bytes(&strbuff, str, length) == -1) {
|
||||
|
||||
@@ -1024,7 +1024,7 @@ static int CmdHF14ACmdRaw(const char *Cmd) {
|
||||
active_select = true;
|
||||
break;
|
||||
case 'b':
|
||||
sscanf(Cmd + i + 2, "%d", &temp);
|
||||
sscanf(Cmd + i + 2, "%u", &temp);
|
||||
numbits = temp & 0xFFFF;
|
||||
i += 3;
|
||||
while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; }
|
||||
@@ -1032,7 +1032,7 @@ static int CmdHF14ACmdRaw(const char *Cmd) {
|
||||
break;
|
||||
case 't':
|
||||
bTimeout = true;
|
||||
sscanf(Cmd + i + 2, "%d", &temp);
|
||||
sscanf(Cmd + i + 2, "%u", &temp);
|
||||
timeout = temp;
|
||||
i += 3;
|
||||
while (Cmd[i] != ' ' && Cmd[i] != '\0') { i++; }
|
||||
|
||||
Reference in New Issue
Block a user