remove switch-enum warnings

This commit is contained in:
Philippe Teuwen
2020-05-11 23:50:14 +02:00
parent 36c523659b
commit b46a99d7d7
8 changed files with 19 additions and 10 deletions

View File

@@ -775,7 +775,7 @@ static int CmdHFiClassELoad(const char *Cmd) {
res = loadFileJSON(filename, dump, 2048, &bytes_read);
break;
}
default:
case DICTIONARY:
PrintAndLogEx(ERR, "No dictionary loaded");
free(dump);
return PM3_ESOFT;

View File

@@ -90,7 +90,8 @@ static void get_SIMD_instruction_set(char *instruction_set) {
case SIMD_MMX:
strcpy(instruction_set, "MMX");
break;
default:
case SIMD_AUTO:
case SIMD_NONE:
strcpy(instruction_set, "no");
break;
}

View File

@@ -572,10 +572,12 @@ static int CmdLFHitagReader(const char *Cmd) {
// No additional parameters needed
break;
}
case RHT1F_PLAIN:
case RHT1F_AUTHENTICATE:
case WHTSF_CHALLENGE:
case WHTSF_KEY:
case WHT2F_PASSWORD:
case WHT2F_CRYPTO:
default:
return usage_hitag_reader();
}
@@ -678,6 +680,8 @@ static int CmdLFHitagWriter(const char *Cmd) {
num_to_bytes(param_get32ex(Cmd, 3, 0, 16), 4, htd.crypto.data);
break;
}
case RHT1F_PLAIN:
case RHT1F_AUTHENTICATE:
case RHTSF_CHALLENGE:
case RHTSF_KEY:
case RHT2F_PASSWORD:
@@ -685,7 +689,6 @@ static int CmdLFHitagWriter(const char *Cmd) {
case RHT2F_CRYPTO:
case RHT2F_TEST_AUTH_ATTEMPTS:
case RHT2F_UID_ONLY:
default:
return usage_hitag_writer();
}

View File

@@ -424,10 +424,13 @@ static bool emojify_token(const char *token, uint8_t token_length, const char **
}
break;
}
default: {// ERASE
case ERASE: {
*emojified_token_length = 0;
break;
}
case ALIAS: { // should never happen
return false;
}
}
return true;
}