From: Andre Noll Date: Sat, 19 Jan 2019 10:42:45 +0000 (+0100) Subject: Remove some duplicate const specifiers. X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=commitdiff_plain Remove some duplicate const specifiers. Newer gcc complains about these, e.g. interactive.c:149:13: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] const char const *delim = "\t\n\f\r\v "; ^~~~~ With the patch applied, the tree compiles cleanly, at least with gcc-7.4.0 and gcc-8.3.0. --- diff --git a/format.h b/format.h index 1e795c6..69d34f5 100644 --- a/format.h +++ b/format.h @@ -44,7 +44,7 @@ enum atom_type { */ struct atom { /** The name of the directive. */ - const char const *name; + const char *name; /** Its type. */ enum atom_type type; }; diff --git a/interactive.c b/interactive.c index 61b4f29..0ed0d82 100644 --- a/interactive.c +++ b/interactive.c @@ -146,7 +146,7 @@ static int icom_set(char *line) static int exec_interactive_command(char *line) { - const char const *delim = "\t\n\f\r\v "; + const char *delim = "\t\n\f\r\v "; int i; char *cmd, *args; int ret = -E_SYNTAX; diff --git a/select.c b/select.c index e000992..a1fc1c2 100644 --- a/select.c +++ b/select.c @@ -168,7 +168,7 @@ struct user_summary_loop_data { static FILE *output_file; -__printf_1_2 static int output(const char const *fmt, ...) +__printf_1_2 static int output(const char *fmt, ...) { va_list argp; int ret;