summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-18 11:31:45 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-18 11:31:45 +0000
commitd69c64b7a6b4469c72da4735476d1de4bcf09768 (patch)
treea007dc3e24a758f2beca55df5f6e350610e459a5 /gcc/objc
parent8f32c760a0b58712d8cd4fc71bf55dbbd7505c34 (diff)
downloadgcc-d69c64b7a6b4469c72da4735476d1de4bcf09768.tar.gz
In gcc/objc/:
2011-10-18 Mikael Pettersson <mikpe@it.uu.se> PR objc/50743 * objc-act.c (check_duplicates): Cast TREE_VEC_LENGTH result to size_t to avoid signed/unsigned comparison. (insert_method_into_method_map): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180132 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog8
-rw-r--r--gcc/objc/objc-act.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index e5fa097c485..6e32f5f4b8a 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,11 @@
+2011-10-18 Mikael Pettersson <mikpe@it.uu.se>
+
+ PR objc/50743
+ * objc-act.c (check_duplicates): Cast TREE_VEC_LENGTH result to
+ size_t to avoid signed/unsigned
+ comparison.
+ (insert_method_into_method_map): Likewise.
+
2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-map.h: New file.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 396d748849f..9690113862e 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -5070,7 +5070,7 @@ check_duplicates (tree method, int methods, int is_class)
alignment. */
if (!warn_strict_selector_match)
{
- for (i = 0; i < TREE_VEC_LENGTH (method); i++)
+ for (i = 0; i < (size_t) TREE_VEC_LENGTH (method); i++)
if (!comp_proto_with_proto (first_method, TREE_VEC_ELT (method, i), 0))
goto issue_warning;
@@ -5103,7 +5103,7 @@ check_duplicates (tree method, int methods, int is_class)
identifier_to_locale (gen_method_decl (first_method)));
}
- for (i = 0; i < TREE_VEC_LENGTH (method); i++)
+ for (i = 0; i < (size_t) TREE_VEC_LENGTH (method); i++)
{
bool type = TREE_CODE (TREE_VEC_ELT (method, i)) == INSTANCE_METHOD_DECL;
@@ -5825,7 +5825,7 @@ insert_method_into_method_map (bool class_method, tree method)
/* Check all the existing prototypes. If any matches the
one we need to add, there is nothing to do because it's
already there. */
- for (i = 0; i < TREE_VEC_LENGTH (existing_entry); i++)
+ for (i = 0; i < (size_t) TREE_VEC_LENGTH (existing_entry); i++)
if (comp_proto_with_proto (method, TREE_VEC_ELT (existing_entry, i), 1))
return;
@@ -5837,7 +5837,7 @@ insert_method_into_method_map (bool class_method, tree method)
new_entry = make_tree_vec (TREE_VEC_LENGTH (existing_entry) + 1);
/* Copy the methods from the existing vector. */
- for (i = 0; i < TREE_VEC_LENGTH (existing_entry); i++)
+ for (i = 0; i < (size_t) TREE_VEC_LENGTH (existing_entry); i++)
TREE_VEC_ELT (new_entry, i) = TREE_VEC_ELT (existing_entry, i);
/* Add the new method at the end. */