* core-aout.c (fetch_core_registers): Cast core_reg_size to int
[deliverable/binutils-gdb.git] / gdb / valarith.c
index 0446907af3bef46f94dfbac668cdbe46cf8f2478..c03d0a4a2ef02d3ab1b4d12443f9d7e559128654 100644 (file)
@@ -133,7 +133,7 @@ value_subscript (array, idx)
 {
   value_ptr bound;
   int c_style = current_language->c_style_arrays;
-  struct type *tarray, *tint;
+  struct type *tarray;
 
   COERCE_REF (array);
   tarray = check_typedef (VALUE_TYPE (array));
@@ -174,7 +174,7 @@ value_subscript (array, idx)
       LONGEST index = value_as_long (idx);
       value_ptr v;
       int offset, byte, bit_index;
-      LONGEST lowerbound, upperbound, word;
+      LONGEST lowerbound, upperbound;
       get_discrete_bounds (range_type, &lowerbound, &upperbound);
       if (index < lowerbound || index > upperbound)
        error ("bitstring index out of range");
@@ -211,9 +211,9 @@ value_subscripted_rvalue (array, idx, lowerbound)
 {
   struct type *array_type = check_typedef (VALUE_TYPE (array));
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
-  int elt_size = TYPE_LENGTH (elt_type);
+  unsigned int elt_size = TYPE_LENGTH (elt_type);
   LONGEST index = value_as_long (idx);
-  int elt_offs = elt_size * longest_to_int (index - lowerbound);
+  unsigned int elt_offs = elt_size * longest_to_int (index - lowerbound);
   value_ptr v;
 
   if (index < lowerbound || elt_offs >= TYPE_LENGTH (array_type))
@@ -710,11 +710,11 @@ value_binop (arg1, arg2, op)
     /* FIXME: This implements ANSI C rules (also correct for C++).
        What about FORTRAN and chill?  */
     {
-      int promoted_len1 = TYPE_LENGTH (type1);
-      int promoted_len2 = TYPE_LENGTH (type2);
+      unsigned int promoted_len1 = TYPE_LENGTH (type1);
+      unsigned int promoted_len2 = TYPE_LENGTH (type2);
       int is_unsigned1 = TYPE_UNSIGNED (type1);
       int is_unsigned2 = TYPE_UNSIGNED (type2);
-      int result_len;
+      unsigned int result_len;
       int unsigned_operation;
 
       /* Determine type length and signedness after promotion for
@@ -1060,8 +1060,8 @@ value_equal (arg1, arg2)
     return (CORE_ADDR) value_as_long (arg1) == value_as_pointer (arg2);
 
   else if (code1 == code2
-          && ((len = TYPE_LENGTH (type1))
-              == TYPE_LENGTH (type2)))
+          && ((len = (int) TYPE_LENGTH (type1))
+              == (int) TYPE_LENGTH (type2)))
     {
       p1 = VALUE_CONTENTS (arg1);
       p2 = VALUE_CONTENTS (arg2);
@@ -1204,7 +1204,7 @@ value_in (element, set)
                            value_as_long (element));
   if (member < 0)
     error ("First argument of 'IN' not in range");
-  return value_from_longest (builtin_type_chill_bool, member);
+  return value_from_longest (LA_BOOL_TYPE, member);
 }
 
 void
This page took 0.041313 seconds and 4 git commands to generate.