From: Liam Beguin <liambeguin@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Duy Nguyen <pclouds@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 8/9] rebase -i: learn to abbreviate command names
Date: Wed, 27 Dec 2017 22:58:19 +0100 [thread overview]
Message-ID: <CAKm4OoVMRd-ZkaB9Z8Mxnavfy077=LifJq9OEeg-mvjEGz4K6A@mail.gmail.com> (raw)
In-Reply-To: <xmqqmv24m186.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On 27 December 2017 at 20:15, Junio C Hamano <gitster@pobox.com> wrote:
> Duy Nguyen <pclouds@gmail.com> writes:
>
>> On Mon, Dec 4, 2017 at 5:17 AM, Liam Beguin <liambeguin@gmail.com> wrote:
>>> +static const char command_to_char(const enum todo_command command)
>>> +{
>>> + if (command < TODO_COMMENT && todo_command_info[command].c)
>>> + return todo_command_info[command].c;
>>> + return comment_line_char;
>>> +}
>>
>> 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)
>> ^
>>
>> Maybe drop the first const.
>
> Thanks. This topic has been in 'next' for quite some time and I
> wanted to merge it down to 'master' soonish, so I've added the
> following before doing so.
Thanks for taking the time. I had prepared the patch but was waiting to get
home to send it.
Only comment I have, maybe s/sequencer.c/rebase -i/ in the subject line
so it matches with the rest.
Since this came up, would it be a good thing to add -Wignored-qualifiers
to the DEVELOPER flags?
>
> -- >8 --
> From: Junio C Hamano <gitster@pobox.com>
> Date: Wed, 27 Dec 2017 11:12:45 -0800
> Subject: [PATCH] sequencer.c: drop 'const' from function return type
>
> 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sequencer.c b/sequencer.c
> index 115085d39c..2a407cbe54 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -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;
> --
> 2.15.1-597-g62d91a8972
>
Thanks,
Liam
next prev parent reply other threads:[~2017-12-27 21:58 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 4:55 [PATCH 0/5] rebase -i: add config to abbreviate command names Liam Beguin
2017-11-27 4:55 ` [PATCH 1/5] Documentation: move rebase.* configs to new file Liam Beguin
2017-11-27 21:27 ` Johannes Schindelin
2017-11-27 4:55 ` [PATCH 2/5] Documentation: use preferred name for the 'todo list' script Liam Beguin
2017-11-27 21:28 ` Johannes Schindelin
2017-11-27 4:55 ` [PATCH 3/5] rebase -i: add exec commands via the rebase--helper Liam Beguin
2017-11-27 5:14 ` Junio C Hamano
2017-11-27 21:41 ` Johannes Schindelin
2017-11-27 23:45 ` Junio C Hamano
2017-11-29 2:01 ` liam Beguin
2017-11-27 22:42 ` Johannes Schindelin
2017-11-27 23:48 ` Junio C Hamano
2017-11-29 2:06 ` liam Beguin
2017-11-29 21:35 ` Johannes Schindelin
2017-11-27 4:55 ` [PATCH 4/5] rebase -i: learn to abbreviate command names Liam Beguin
2017-11-27 5:19 ` Junio C Hamano
2017-11-29 2:08 ` liam Beguin
2017-11-27 23:04 ` Johannes Schindelin
2017-11-27 23:11 ` Jeff King
2017-11-29 2:11 ` liam Beguin
2017-11-29 2:10 ` liam Beguin
2017-11-29 21:40 ` Johannes Schindelin
2017-12-03 1:18 ` Junio C Hamano
2017-11-27 4:55 ` [PATCH 5/5] t3404: add test case for abbreviated commands Liam Beguin
2017-11-27 5:28 ` Junio C Hamano
2017-11-27 23:16 ` Johannes Schindelin
2017-11-27 5:23 ` [PATCH 0/5] rebase -i: add config to abbreviate command names Junio C Hamano
2017-11-29 1:56 ` liam Beguin
2017-12-03 22:17 ` [PATCH v2 0/9] " Liam Beguin
2017-12-03 22:17 ` [PATCH v2 1/9] Documentation: move rebase.* configs to new file Liam Beguin
2017-12-03 22:17 ` [PATCH v2 2/9] Documentation: use preferred name for the 'todo list' script Liam Beguin
2017-12-03 22:17 ` [PATCH v2 3/9] rebase -i: set commit to null in exec commands Liam Beguin
2017-12-03 22:17 ` [PATCH v2 4/9] rebase -i: refactor transform_todo_ids Liam Beguin
2017-12-04 14:42 ` Johannes Schindelin
2017-12-04 16:09 ` Junio C Hamano
2017-12-05 3:36 ` liam Beguin
2017-12-05 12:35 ` Junio C Hamano
2017-12-05 3:39 ` liam Beguin
2017-12-03 22:17 ` [PATCH v2 5/9] rebase -i: replace reference to sha1 with oid Liam Beguin
2017-12-03 22:17 ` [PATCH v2 6/9] rebase -i: update functions to use a flags parameter Liam Beguin
2017-12-04 15:46 ` Johannes Schindelin
2017-12-04 16:06 ` Johannes Schindelin
2017-12-05 3:42 ` liam Beguin
2017-12-05 12:37 ` Junio C Hamano
2017-12-05 12:41 ` Kerry, Richard
2017-12-05 14:42 ` liam Beguin
2017-12-05 16:05 ` Junio C Hamano
2017-12-05 16:14 ` Kerry, Richard
2017-12-03 22:17 ` [PATCH v2 7/9] rebase -i -x: add exec commands via the rebase--helper Liam Beguin
2017-12-03 22:17 ` [PATCH v2 8/9] rebase -i: learn to abbreviate command names Liam Beguin
2017-12-25 12:48 ` Duy Nguyen
2017-12-25 15:39 ` Liam Beguin
2017-12-25 23:58 ` Duy Nguyen
2017-12-27 19:15 ` Junio C Hamano
2017-12-27 21:58 ` Liam Beguin [this message]
2017-12-28 18:55 ` Junio C Hamano
2017-12-03 22:17 ` [PATCH v2 9/9] t3404: add test case for abbreviated commands Liam Beguin
2017-12-04 16:07 ` [PATCH v2 0/9] rebase -i: add config to abbreviate command names Johannes Schindelin
2017-12-05 17:52 ` Liam Beguin
2017-12-05 17:52 ` [PATCH v3 1/9] Documentation: move rebase.* configs to new file Liam Beguin
2017-12-05 17:52 ` [PATCH v3 2/9] Documentation: use preferred name for the 'todo list' script Liam Beguin
2017-12-05 17:52 ` [PATCH v3 3/9] rebase -i: set commit to null in exec commands Liam Beguin
2017-12-05 17:52 ` [PATCH v3 4/9] rebase -i: refactor transform_todo_ids Liam Beguin
2017-12-05 17:52 ` [PATCH v3 5/9] rebase -i: replace reference to sha1 with oid Liam Beguin
2017-12-05 17:52 ` [PATCH v3 6/9] rebase -i: update functions to use a flags parameter Liam Beguin
2017-12-05 17:52 ` [PATCH v3 7/9] rebase -i -x: add exec commands via the rebase--helper Liam Beguin
2017-12-05 17:52 ` [PATCH v3 8/9] rebase -i: learn to abbreviate command names Liam Beguin
2017-12-05 17:52 ` [PATCH v3 9/9] t3404: add test case for abbreviated commands Liam Beguin
2017-12-05 22:21 ` [PATCH v2 0/9] rebase -i: add config to abbreviate command names Junio C Hamano
2017-12-06 2:42 ` liam Beguin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKm4OoVMRd-ZkaB9Z8Mxnavfy077=LifJq9OEeg-mvjEGz4K6A@mail.gmail.com' \
--to=liambeguin@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).