sequencer.c: drop 'const' from function return type
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Dec 2017 19:12:45 +0000 (11:12 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Dec 2017 19:12:45 +0000 (11:12 -0800)
With -Werror=ignored-qualifiers, a function that claims to return
"const char" gets this error:

    CC sequencer.o
sequencer.c:798:19: error: type qualifiers ignored on function return
type [-Werror=ignored-qualifiers]
 static const char command_to_char(const enum todo_command command)
                   ^

Reported-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c

index 115085d..2a407cb 100644 (file)
@@ -795,7 +795,7 @@ static const char *command_to_string(const enum todo_command command)
        die("Unknown command: %d", command);
 }
 
-static const char command_to_char(const enum todo_command command)
+static char command_to_char(const enum todo_command command)
 {
        if (command < TODO_COMMENT && todo_command_info[command].c)
                return todo_command_info[command].c;