Re: [PATCH v2 1/5] commit: ignore additional signatures when parsing signed commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 11, 2021 at 03:58:36AM +0000, brian m. carlson wrote:
> diff --git a/commit.c b/commit.c
> index f128f18a9b..93faaad764 100644
> --- a/commit.c
> +++ b/commit.c

> @@ -1082,23 +1087,27 @@ int remove_signature(struct strbuf *buf)
>  	const char *line = buf->buf;
>  	const char *tail = buf->buf + buf->len;
>  	int in_signature = 0;
> -	const char *sig_start = NULL;
> -	const char *sig_end = NULL;
> +	struct sigbuf {
> +		const char *start;
> +		const char *end;
> +	} sigs[2] = { 0 }, *sigp = &sigs[0];

Various Clang versions issue the following warning about this
initialization:

    CC commit.o
commit.c:1105:16: error: suggest braces around initialization of subobject
      [-Werror,-Wmissing-braces]
        } sigs[2] = { 0 }, *sigp = &sigs[0];
                      ^
                      {}
1 error generated.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux