From b77042a9209e2737377e94d9257ca25ec0079951 Mon Sep 17 00:00:00 2001 From: Paul Dettorer Hervot Date: Wed, 9 Dec 2015 15:58:18 +0100 Subject: [PATCH] gdbstub: store register indexes in an enum rather than const u32. This fixes a tautological-compare warning in src/core/gdbstub/gdbstub.cpp line 472 because `R0_REGISTER` is 0 and `id` is unsigned. --- src/core/gdbstub/gdbstub.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 3a2445241..526e10fe2 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -55,10 +55,12 @@ const u32 SIGTERM = 15; const u32 MSG_WAITALL = 8; #endif -const u32 R0_REGISTER = 0; -const u32 R15_REGISTER = 15; -const u32 CPSR_REGISTER = 25; -const u32 FPSCR_REGISTER = 58; +enum GDBRegister { + R0_REGISTER = 0, + R15_REGISTER = 15, + CPSR_REGISTER = 25, + FPSCR_REGISTER = 58 +}; namespace GDBStub {