@@ -120,12 +120,6 @@ static void asm_modifier(struct token *token, unsigned long *mods, unsigned long
*mods |= mod;
}
-/* the types of formatting from __attribute__((format)) */
-enum {
- FMT_PRINTF = 0,
- FMT_SCANF,
-};
-
static struct symbol_op typedef_op = {
.type = KW_MODIFIER,
.declarator = storage_specifier,
@@ -95,6 +95,13 @@ extern struct context *alloc_context(void);
DECLARE_PTR_LIST(context_list, struct context);
+/* the types of formatting from __attribute__((format)) */
+enum {
+ FMT_UNKNOWN,
+ FMT_PRINTF,
+ FMT_SCANF,
+};
+
struct attr_format {
unsigned short index; /* index in argument list for format string */
unsigned short first; /* where first variadic argument is */
Move these from parse.c to symbol.h so that they can be reused when verifying the format. Also, add a definition for unknown format type: FMT_UNKNOWN Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- parse.c | 6 ------ symbol.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-)