Fix warning about bitfield in struct ref
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>
Shawn O. Pearce committed
Nov 18, 2007 at 04:31 UTC
9f8a15c73437abc634f2c43501105b108c51eae8
1 file changed
+4
-4
cache.h
+4
-4
@@ -493,10 +493,10 @@ struct ref {
493
struct ref *next;
494
unsigned char old_sha1[20];
495
unsigned char new_sha1[20];
496
- unsigned char force : 1;
497
- unsigned char merge : 1;
498
- unsigned char nonfastforward : 1;
499
- unsigned char deletion : 1;
496
+ unsigned int force:1,
497
+ merge:1,
498
+ nonfastforward:1,
499
+ deletion:1;
500
enum {
501
REF_STATUS_NONE = 0,
502
REF_STATUS_OK,