git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix warning about bitfield in struct ref
@ 2007-11-18  9:31 Shawn O. Pearce
  2007-11-19 23:58 ` Johannes Schindelin
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn O. Pearce @ 2007-11-18  9:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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>
---
 cache.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cache.h b/cache.h
index ba9178f..65e019e 100644
--- a/cache.h
+++ b/cache.h
@@ -500,10 +500,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,
-- 
1.5.3.5.1794.g083e

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-21 12:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18  9:31 [PATCH] Fix warning about bitfield in struct ref Shawn O. Pearce
2007-11-19 23:58 ` Johannes Schindelin
2007-11-21  6:51   ` Shawn O. Pearce
2007-11-21 11:59     ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).