Commit 29ced803 by Alexandre Oliva Committed by Alexandre Oliva

* c-common.c (status_warning) [! ANSI_PROTOTYPES]: Load status

from va_list before using it.

From-SVN: r37900
parent 25e4379f
2000-11-30 Alexandre Oliva <aoliva@redhat.com>
* c-common.c (status_warning) [! ANSI_PROTOTYPES]: Load status
from va_list before using it.
2000-11-30 Michael Matz <matzmich@cs.tu-berlin.de> 2000-11-30 Michael Matz <matzmich@cs.tu-berlin.de>
* flow.c (make_edge): Early out, if no flags to set. * flow.c (make_edge): Early out, if no flags to set.
......
...@@ -2021,24 +2021,24 @@ status_warning VPARAMS ((int *status, const char *msgid, ...)) ...@@ -2021,24 +2021,24 @@ status_warning VPARAMS ((int *status, const char *msgid, ...))
va_list ap; va_list ap;
diagnostic_context dc; diagnostic_context dc;
if (status) VA_START (ap, msgid);
*status = 1;
else
{
VA_START (ap, msgid);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
status = va_arg (ap, int *); status = va_arg (ap, int *);
msgid = va_arg (ap, const char *); msgid = va_arg (ap, const char *);
#endif #endif
if (status)
*status = 1;
else
{
/* This duplicates the warning function behavior. */ /* This duplicates the warning function behavior. */
set_diagnostic_context set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1); (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1);
report_diagnostic (&dc); report_diagnostic (&dc);
va_end (ap);
} }
va_end (ap);
} }
/* Variables used by the checking of $ operand number formats. */ /* Variables used by the checking of $ operand number formats. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment