Skip to content

Commit

Permalink
diffcore.h: be explicit about the signedness of is_binary
Browse files Browse the repository at this point in the history
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>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Richard Lowe authored and Junio C Hamano committed Feb 24, 2014
1 parent cbfe47b commit 7d0a9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diffcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit 7d0a9a7

Please sign in to comment.