Author: Kazu Hirata Date: 2022-11-23T15:55:05-08:00 New Revision: a2f1879c2d8ad5e6c2773d77d9f6d3fdaffbe3ea
URL: https://github.com/llvm/llvm-project/commit/a2f1879c2d8ad5e6c2773d77d9f6d3fdaffbe3ea DIFF: https://github.com/llvm/llvm-project/commit/a2f1879c2d8ad5e6c2773d77d9f6d3fdaffbe3ea.diff LOG: [lldb] Fix a warning This patch fixes: lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp:105:18: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits] Added: Modified: lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp index ca7adff785d99..7c29bce147715 100644 --- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp +++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp @@ -102,7 +102,7 @@ static uint32_t GPREncodingToLLDB(uint32_t reg_encode) { } static uint32_t FPREncodingToLLDB(uint32_t reg_encode) { - if (reg_encode >= 0 && reg_encode <= 31) + if (reg_encode <= 31) return fpr_f0_riscv + reg_encode; return LLDB_INVALID_REGNUM; } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits