]> git.tuebingen.mpg.de Git - adu.git/commitdiff
Remove some duplicate const specifiers. master
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 19 Jan 2019 10:42:45 +0000 (11:42 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 3 May 2019 22:47:52 +0000 (00:47 +0200)
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.

format.h
interactive.c
select.c

index 1e795c6c03a3bd29c4f1049c271d7d2a90bd547c..69d34f53d1932e7e78d8f3ae44d3cab4a7595480 100644 (file)
--- 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;
 };
index 61b4f293562bfe8077f9bcc25f528887605bb7ce..0ed0d8234c06c56c4f217a52d7ddb881d83ad8b7 100644 (file)
@@ -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;
index e0009927d188359c76a78116b7bb6148cd186f6d..a1fc1c20512b3038b0500cf7feefb3891bd76b7a 100644 (file)
--- 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;