From: Ben Pfaff Date: Sat, 1 May 2021 22:53:09 +0000 (-0700) Subject: format-parser: Fix inconsistent use of "char *" vs "char[NUMBER]". X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea75d9702346b57b13830e619e9c447b0b976f89;p=pspp format-parser: Fix inconsistent use of "char *" vs "char[NUMBER]". These are equivalent according to the C standard in function prototypes, but GCC 11 warns about using them inconsistently between a prototype and a definition. This commit avoids the warning. --- diff --git a/src/language/lexer/format-parser.c b/src/language/lexer/format-parser.c index 2ecd539b8f..906d0f3271 100644 --- a/src/language/lexer/format-parser.c +++ b/src/language/lexer/format-parser.c @@ -16,13 +16,14 @@ #include +#include "language/lexer/format-parser.h" + #include #include #include #include "data/format.h" #include "data/variable.h" -#include "language/lexer/format-parser.h" #include "language/lexer/lexer.h" #include "libpspp/message.h" #include "libpspp/misc.h" diff --git a/src/language/lexer/format-parser.h b/src/language/lexer/format-parser.h index 8704e93c47..7601bc46b2 100644 --- a/src/language/lexer/format-parser.h +++ b/src/language/lexer/format-parser.h @@ -19,9 +19,12 @@ #include +#include "data/format.h" + struct lexer; -bool parse_abstract_format_specifier (struct lexer *, char *type, +bool parse_abstract_format_specifier (struct lexer *, + char type[FMT_TYPE_LEN_MAX + 1], uint16_t *width, uint8_t *decimals); enum fmt_type ;