[Lldb-commits] [PATCH] D32137: [Utility] Placate another GCC warning
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 17 14:08:24 PDT 2017
davide created this revision.
For reference/discussion.
GCC complains about signed-vs-unsigned comparison. I'm actually surprised that `m_registers_count` is a `signed` integer, as I can hardly imagine a negative register count. I'm under the impression that we could change `m_register_count` fields to be unsigned, but that would be a larger change. Thoughts?
https://reviews.llvm.org/D32137
Files:
source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
Index: source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
===================================================================
--- source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
+++ source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
@@ -55,9 +55,10 @@
m_registers_count[i] = reg_set_ptr->num_registers;
}
- assert(m_num_registers == m_registers_count[gpr_registers_count] +
- m_registers_count[fpr_registers_count] +
- m_registers_count[msa_registers_count]);
+ assert(m_num_registers ==
+ static_cast<unsigned>(m_registers_count[gpr_registers_count] +
+ m_registers_count[fpr_registers_count] +
+ m_registers_count[msa_registers_count]));
// elf-core yet to support ReadFPR()
ProcessSP base = CalculateProcess();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32137.95485.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170417/d57a5f32/attachment.bin>
More information about the lldb-commits
mailing list