apparmor/parser/libapparmor_re/flex-tables.h
Kees Cook eaa6a3c297 This cleans up a number of warnings that appeared after the parser rework
commits were made (as well as a few other minor warnings elsewhere).

The Makefile change is to avoid passing -Wstrict-prototypes and
-Wnested-externs to the C++ compiler, which the compiler yells about and
then ignores.

Since we compile with -Wmissing-field-initializers I dropped the
unreferenced zero-width fields in the header structs, and then explicitly
initialized the remaining fields.

I tagged several unused function parameters to silence those warnings.

And finally, I dropped the unused filter_escapes() too.
2010-11-09 13:39:18 -08:00

41 lines
760 B
C

#ifndef __FLEX_TABLES_H
#define __FLEX_TABLES_H
#include <stdlib.h>
#include <stdint.h>
#define YYTH_MAGIC 0xF13C57B1
struct table_set_header {
uint32_t th_magic; /* TH_MAGIC */
uint32_t th_hsize;
uint32_t th_ssize;
uint16_t th_flags;
/* char th_version[];
char th_name[];
char th_pad64[];*/
} __attribute__ ((packed));
#define YYTD_ID_ACCEPT 1
#define YYTD_ID_BASE 2
#define YYTD_ID_CHK 3
#define YYTD_ID_DEF 4
#define YYTD_ID_EC 5
#define YYTD_ID_META 6
#define YYTD_ID_ACCEPT2 7
#define YYTD_ID_NXT 8
#define YYTD_DATA8 1
#define YYTD_DATA16 2
#define YYTD_DATA32 4
struct table_header {
uint16_t td_id;
uint16_t td_flags;
uint32_t td_hilen;
uint32_t td_lolen;
/* char td_data[];
char td_pad64[];*/
} __attribute__ ((packed));
#endif