Ideally they should be declared in the corresponding header file, but the overall include style in the checkpolicy code is quite messy. Declare them for now in the source file before defining them to silence related compiler warnings: policy_define.c:84:6: error: no previous prototype for function 'init_parser' [-Werror,-Wmissing-prototypes] void init_parser(int pass_number) ^ policy_define.c:93:6: error: no previous prototype for function 'yyerror2' [-Werror,-Wmissing-prototypes] void yyerror2(const char *fmt, ...) ^ Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- checkpolicy/policy_define.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c index 11707700..c71e0571 100644 --- a/checkpolicy/policy_define.c +++ b/checkpolicy/policy_define.c @@ -60,6 +60,10 @@ #include "module_compiler.h" #include "policy_define.h" +extern void init_parser(int pass_number); +__attribute__ ((format(printf, 1, 2))) +extern void yyerror2(const char *fmt, ...); + policydb_t *policydbp; queue_t id_queue = 0; unsigned int pass; @@ -89,7 +93,6 @@ void init_parser(int pass_number) pass = pass_number; } -__attribute__ ((format(printf, 1, 2))) void yyerror2(const char *fmt, ...) { va_list ap; -- 2.33.0