Merge pull request #432 from vmojzis/warning

Report warning on duplicate definition of interface
This commit is contained in:
Chris PeBenito 2021-11-15 08:56:21 -05:00 committed by GitHub
commit af39a6ed86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ define(`policy_m4_comment',`
# template(name,rules)
#
define(`template',` dnl
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__line__)') dnl
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl
`define(`$1',` dnl
pushdef(`policy_call_depth',incr(policy_call_depth)) dnl
policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl
@ -77,7 +77,7 @@ define(`template',` dnl
# interface(name,rules)
#
define(`interface',` dnl
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__line__)') dnl
ifdef(`$1',`refpolicyerr(`duplicate definition of $1(). Original definition on '$1.) define(`__if_error')',`define(`$1',__file__:__line__)') dnl
`define(`$1',` dnl
pushdef(`policy_call_depth',incr(policy_call_depth)) dnl
policy_m4_comment(policy_call_depth,begin `$1'(dollarsstar)) dnl