mod_macro checks that nesting is complete inside a macro. This looks a good default, however there are some cases where we want this and it generates a warning for nothing. Ex: <Macro MyBeginVhost @name @ip_port> <VirtualHost @ip_port> ServerName @name ... </Macro> I'd like to add an option to suppress this warning when we need it. The simplest option I see would be to add something on the macro definition line itself. Because we may need some other options later, I guess a "flag" would be the most generic approach. What syntax would be the best one? maybe a (one character) /option after the Macro keyword? Ex: "<Macro/n ...>" (and later "<Macro/ni ..." if we add another flag)
Created attachment 34012 [details] Add directives & flags to control warnings MacroIgnoreEmptyArg: globally disable warning about empty arguments. MacroIgnoreBadNesting: globally disable warning about bad nesting. /IgnoreEmptyArg & /IgnoreBadNesting: disable warning in one macro definition
Patch seems to use 'bool' ??
Created attachment 34326 [details] Fixed the BOOL case Add directives & flags to control warnings Fixed the BOOL case
Created attachment 34365 [details] Final version compiling on Windows/Linux
We too would find it very useful to have a directive to hide the empty-argument warning. For instance, to have an argument for a base URL, sometimes this needs to be a intentionally empty string ("") in the case of a top-level domain installation. Seeing the warning every time an Apache restart is done is irritating and only obscures real problems.
Fixed in 1770843