This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix warning in ipa-inline-analysis.c


An --enable-werror cross build (but apparently not a normal C++ bootstrap)
showed up a signed/unsigned warning in ipa-inline-analysis.c.

Tested on arm-linux-gnueabi.  Applied as obvious.

Richard


gcc/
	* ipa-inline-analysis.c (predicate_probability): Avoid comparison
	between signed and unsigned.

Index: gcc/ipa-inline-analysis.c
===================================================================
--- gcc/ipa-inline-analysis.c	2011-09-27 09:24:13.000000000 +0100
+++ gcc/ipa-inline-analysis.c	2011-09-27 09:51:36.604322350 +0100
@@ -482,8 +482,8 @@ predicate_probability (conditions conds,
 				     i2 - predicate_first_dynamic_condition);
 		    if (c->code == CHANGED
 			&& (c->operand_num
-			    < VEC_length (inline_param_summary_t,
-					  inline_param_summary)))
+			    < (int) VEC_length (inline_param_summary_t,
+						inline_param_summary)))
 		      {
 			int iprob = VEC_index (inline_param_summary_t,
 					       inline_param_summary,
@@ -2353,8 +2353,8 @@ remap_edge_change_prob (struct cgraph_ed
 	  struct ipa_jump_func *jfunc = ipa_get_ith_jump_func (args, i);
 	  if (jfunc->type == IPA_JF_PASS_THROUGH
 	      && (jfunc->value.pass_through.formal_id
-		  < VEC_length (inline_param_summary_t,
-				inlined_es->param)))
+		  < (int) VEC_length (inline_param_summary_t,
+				      inlined_es->param)))
 	    {
 	      int prob1 = VEC_index (inline_param_summary_t,
 				     es->param, i)->change_prob;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]