From 9b4b1ed50f1e0f252a86851456b58bb2e142c495 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 29 Sep 2020 11:25:13 -0400 Subject: [PATCH] analyzer: silence -Wsign-compare warnings gcc/analyzer/ChangeLog: * constraint-manager.cc (constraint_manager::add_constraint_internal): Whitespace fixes. Silence -Wsign-compare warning. * engine.cc (maybe_process_run_of_before_supernode_enodes): Silence -Wsign-compare warning. --- gcc/analyzer/constraint-manager.cc | 6 +++--- gcc/analyzer/engine.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/analyzer/constraint-manager.cc b/gcc/analyzer/constraint-manager.cc index 5cd2c9e0e0b..603b22811c1 100644 --- a/gcc/analyzer/constraint-manager.cc +++ b/gcc/analyzer/constraint-manager.cc @@ -1014,10 +1014,10 @@ constraint_manager::add_unknown_constraint (equiv_class_id lhs_ec_id, void constraint_manager::add_constraint_internal (equiv_class_id lhs_id, - enum constraint_op c_op, - equiv_class_id rhs_id) + enum constraint_op c_op, + equiv_class_id rhs_id) { - if (m_constraints.length () >= param_analyzer_max_constraints) + if (m_constraints.length () >= (unsigned)param_analyzer_max_constraints) return; constraint new_c (lhs_id, c_op, rhs_id); diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 84eaa8415da..c15d1195a97 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -2629,7 +2629,7 @@ maybe_process_run_of_before_supernode_enodes (exploded_node *enode) } got_merger: gcc_assert (it->m_merger_idx >= 0); - gcc_assert (it->m_merger_idx < merged_states.length ()); + gcc_assert ((unsigned)it->m_merger_idx < merged_states.length ()); } /* Create merger nodes. */ -- 2.30.2