analyzer: silence -Wsign-compare warnings
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 29 Sep 2020 15:25:13 +0000 (11:25 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 29 Sep 2020 20:56:02 +0000 (16:56 -0400)
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
gcc/analyzer/engine.cc

index 5cd2c9e0e0bf63de2a56820285f74e6504ac67aa..603b22811c17b655e538a9f254b4d94c3d6b223f 100644 (file)
@@ -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);
index 84eaa8415da2b91b276e10fdca5439a2b24be89f..c15d1195a9709e4252ab29939997bc095e2b66bf 100644 (file)
@@ -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.  */