2004-10-10 Mark Kettenis <kettenis@gnu.org>
+ * ada-lang.c (lim_warning): Re-implement as a varargs function.
+ (decode_packed_array_type, value_subscript_packed)
+ (ada_evaluate_subexp, to_fixed_range_type): Remove redundant
+ argument in call to lim_warning.
+
* configure.in: Really disable the TUI if an enhanced curses
library isn't found.
* configure: Regenerate.
with exactly one argument rather than ...), unless the limit on the
number of warnings has passed during the evaluation of the current
expression. */
+
static void
-lim_warning (const char *format, long arg)
+lim_warning (const char *format, ...)
{
+ va_list args;
+ va_start (args, format);
+
warnings_issued += 1;
if (warnings_issued <= warning_limit)
- warning (format, arg);
+ vwarning (format, args);
+
+ va_end (args);
}
/* Note: would have used MAX_OF_TYPE and MIN_OF_TYPE macros from
sym = standard_lookup (name, get_selected_block (0), VAR_DOMAIN);
if (sym == NULL || SYMBOL_TYPE (sym) == NULL)
{
- lim_warning ("could not find bounds information on packed array", 0);
+ lim_warning ("could not find bounds information on packed array");
return NULL;
}
shadow_type = SYMBOL_TYPE (sym);
if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
{
- lim_warning ("could not understand bounds information on packed array",
- 0);
+ lim_warning ("could not understand bounds information on packed array");
return NULL;
}
if (sscanf (tail + sizeof ("___XP") - 1, "%ld", &bits) != 1)
{
lim_warning
- ("could not understand bit size information on packed array", 0);
+ ("could not understand bit size information on packed array");
return NULL;
}
if (get_discrete_bounds (range_type, &lowerbound, &upperbound) < 0)
{
- lim_warning ("don't know bounds of array", 0);
+ lim_warning ("don't know bounds of array");
lowerbound = upperbound = 0;
}
{
default:
lim_warning ("Membership test incompletely implemented; "
- "always returns true", 0);
+ "always returns true");
return value_from_longest (builtin_type_int, (LONGEST) 1);
case TYPE_CODE_RANGE:
L = get_int_var_value (name_buf, &ok);
if (!ok)
{
- lim_warning ("Unknown lower bound, using 1.", 1);
+ lim_warning ("Unknown lower bound, using 1.");
L = 1;
}
}