diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-09-13 20:58:28 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-09-13 20:58:28 -0400 |
| commit | f068de0f2d2fec6ca6d039a9648316f35e6ad965 (patch) | |
| tree | fffa286f3251cd4b18f7ae43615824871ad77776 /arch/mips | |
| parent | 590b594850ccd15b9e2cb2b0e8f3050d782647b3 (diff) | |
Fix many warnings
Diffstat (limited to 'arch/mips')
| -rw-r--r-- | arch/mips/mips/mips.c | 5 | ||||
| -rw-r--r-- | arch/mips/mips/test.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/mips/mips.c b/arch/mips/mips/mips.c index 7ab64f24..32c58aa6 100644 --- a/arch/mips/mips/mips.c +++ b/arch/mips/mips/mips.c @@ -1,6 +1,7 @@ #define _CRT_SECURE_NO_WARNINGS #include <stdlib.h> #include <stdio.h> +#include <inttypes.h> #include "mips.h" #ifdef __cplusplus @@ -2389,7 +2390,7 @@ uint32_t mips_disassemble( if (instruction->operands[i].immediate >= 0x80000000) snprintf(operandPtr, 64, "-%#x", -(int32_t)instruction->operands[i].immediate); else - snprintf(operandPtr, 64, "%#llx", instruction->operands[i].immediate); + snprintf(operandPtr, 64, "%#" PRIx64 "", instruction->operands[i].immediate); break; case MEM_IMM: if (instruction->operands[i].immediate != 0) @@ -2402,7 +2403,7 @@ uint32_t mips_disassemble( } else { - snprintf(operandPtr, 64, "%#llx(%s)", + snprintf(operandPtr, 64, "%#" PRIx64 "(%s)", instruction->operands[i].immediate, RegisterStrings[instruction->operands[i].reg]); } diff --git a/arch/mips/mips/test.c b/arch/mips/mips/test.c index fbe8335a..c2bf6333 100644 --- a/arch/mips/mips/test.c +++ b/arch/mips/mips/test.c @@ -7,6 +7,7 @@ b mips_disassemble #include <stdio.h> #include <stdint.h> +#include <inttypes.h> #include "mips.h" @@ -75,6 +76,6 @@ int main(int ac, char **av) } if(0 == disassemble(insword, address, MIPS_32, instxt)) { - printf("%08llX: %08X %s\n", address, insword, instxt); + printf("%08" PRIX64 ": %08X %s\n", address, insword, instxt); } } |
