From: Junio C Hamano <gitster@pobox.com>
To: Richard Lowe <richlowe@richlowe.net>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] diffcore.h: be explicit about the signedness of is_binary
Date: Mon, 24 Feb 2014 09:55:48 -0800 [thread overview]
Message-ID: <xmqqmwhg9yzf.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <m2ob1xba94.fsf@richlowe.net> (Richard Lowe's message of "Sun, 23 Feb 2014 19:54:47 -0500")
Richard Lowe <richlowe@richlowe.net> writes:
> Bitfields need to specify their signedness explicitly or the compiler is
> free to default as it sees fit. With compilers that default 'unsigned'
> (SUNWspro 12 seems to do this) the tri-state nature of is_binary
> vanishes and all files are treated as binary.
>
> Signed-off-by: Richard Lowe <richlowe@richlowe.net>
> ---
Looks good; thanks.
> diffcore.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/diffcore.h b/diffcore.h
> index 79de8cf..7c6f391 100644
> --- a/diffcore.h
> +++ b/diffcore.h
> @@ -46,7 +46,7 @@ struct diff_filespec {
> unsigned is_stdin : 1;
> unsigned has_more_entries : 1; /* only appear in combined diff */
> /* data should be considered "binary"; -1 means "don't know yet" */
> - int is_binary : 2;
> + signed int is_binary : 2;
> struct userdiff_driver *driver;
> };
prev parent reply other threads:[~2014-02-24 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 0:54 [PATCH] diffcore.h: be explicit about the signedness of is_binary Richard Lowe
2014-02-24 2:09 ` Jeff King
2014-02-24 17:55 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmwhg9yzf.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=richlowe@richlowe.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.