aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-06-22 05:23:33 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-06-22 05:23:33 +0000
commit296433e1a9e3c644fec1f1805dd595555683d9a0 (patch)
tree279c567a607717883b54fd2f58e33c32342072aa /gcc/objc/objc-act.c
parent9aea9eec602af941a5134cd3548e80c42b1b362a (diff)
downloadgcc-296433e1a9e3c644fec1f1805dd595555683d9a0.zip
gcc-296433e1a9e3c644fec1f1805dd595555683d9a0.tar.gz
gcc-296433e1a9e3c644fec1f1805dd595555683d9a0.tar.bz2
Warning fixes:
* Makefile.in (varasm.o): Depend on sdbout.h. (sdbout.o): Depend on toplev.h. * collect2.c (scan_prog_file): Cast fprintf argument to `long' and use %ld specifier. * final.c (shorten_branches): Cast first arg of `bzero' to char *. * genextract.c (main): When creating insn-extract.c, mark variable `i' with ATTRIBUTE_UNUSED. * genpeep.c (main): When creating insn-peep.c, mark variables `insn', `x' and `pat' with ATTRIBUTE_UNUSED. * objc/init.c (__objc_tree_print): Wrap function definition in macro `DEBUG'. * objc/objc-act.c (encode_array): Cast sprintf argument to `long' and use %ld specifier. (adorn_decl): Likewise, twice. From-SVN: r20650
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r--gcc/objc/objc-act.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index e1cde90..9f40371 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -6557,9 +6557,9 @@ encode_array (type, curtype, format)
return;
}
- sprintf (buffer, "[%d",
- (TREE_INT_CST_LOW (an_int_cst)
- / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
+ sprintf (buffer, "[%ld",
+ (long) (TREE_INT_CST_LOW (an_int_cst)
+ / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
obstack_grow (&util_obstack, buffer, strlen (buffer));
encode_type (array_of, curtype, format);
@@ -7361,7 +7361,8 @@ adorn_decl (decl, str)
tree an_int_cst = TREE_OPERAND (decl, 1);
if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_CST)
- sprintf (str + strlen (str), "[%d]", TREE_INT_CST_LOW (an_int_cst));
+ sprintf (str + strlen (str), "[%ld]",
+ (long) TREE_INT_CST_LOW (an_int_cst));
else
strcat (str, "[]");
}
@@ -7372,9 +7373,9 @@ adorn_decl (decl, str)
tree array_of = TREE_TYPE (decl);
if (an_int_cst && TREE_CODE (an_int_cst) == INTEGER_TYPE)
- sprintf (str + strlen (str), "[%d]",
- (TREE_INT_CST_LOW (an_int_cst)
- / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
+ sprintf (str + strlen (str), "[%ld]",
+ (long) (TREE_INT_CST_LOW (an_int_cst)
+ / TREE_INT_CST_LOW (TYPE_SIZE (array_of))));
else
strcat (str, "[]");
}