Skip to content

Commit

Permalink
Fix warning about bitfield in struct ref
Browse files Browse the repository at this point in the history
cache.h:503: warning: type of bit-field 'force' is a GCC extension
cache.h:504: warning: type of bit-field 'merge' is a GCC extension
cache.h:505: warning: type of bit-field 'nonfastforward' is a GCC extension
cache.h:506: warning: type of bit-field 'deletion' is a GCC extension

So we change it to an 'unsigned int' which is not a GCC extension.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Nov 18, 2007
1 parent ca74c45 commit 9f8a15c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ struct ref {
struct ref *next;
unsigned char old_sha1[20];
unsigned char new_sha1[20];
unsigned char force : 1;
unsigned char merge : 1;
unsigned char nonfastforward : 1;
unsigned char deletion : 1;
unsigned int force:1,
merge:1,
nonfastforward:1,
deletion:1;
enum {
REF_STATUS_NONE = 0,
REF_STATUS_OK,
Expand Down

0 comments on commit 9f8a15c

Please sign in to comment.