From 3bec3ef53e6e54cc94d9ed0142a2304729092282 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 7 Nov 2013 15:37:13 +0100 Subject: emit warning message if output module with msg passing mode runs asynchronously --- runtime/rsconf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'runtime/rsconf.c') diff --git a/runtime/rsconf.c b/runtime/rsconf.c index 8c808786..b1016568 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -291,6 +291,21 @@ finalize_it: /*------------------------------ interface to flex/bison parser ------------------------------*/ extern int yylineno; +void +parser_warnmsg(char *fmt, ...) +{ + va_list ap; + char errBuf[1024]; + + va_start(ap, fmt); + if(vsnprintf(errBuf, sizeof(errBuf), fmt, ap) == sizeof(errBuf)) + errBuf[sizeof(errBuf)-1] = '\0'; + errmsg.LogError(0, RS_RET_CONF_PARSE_WARNING, + "warning during parsing file %s, on or before line %d: %s", + cnfcurrfn, yylineno, errBuf); + va_end(ap); +} + void parser_errmsg(char *fmt, ...) { -- cgit v1.2.3