mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-11 08:35:01 +00:00
checkpolicy: add missing function declarations
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@googlemail.com>
This commit is contained in:
parent
5c376d6db1
commit
e6bab7bf45
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user