login
Header Space

 
 

[PATCH] Fix warning about bitfield in struct ref

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: <git@...>
Date: Sunday, November 18, 2007 - 5:31 am

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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix warning about bitfield in struct ref, Shawn O. Pearce, (Sun Nov 18, 5:31 am)
Re: [PATCH] Fix warning about bitfield in struct ref, Johannes Schindelin, (Mon Nov 19, 7:58 pm)
Re: [PATCH] Fix warning about bitfield in struct ref, Shawn O. Pearce, (Wed Nov 21, 2:51 am)
Re: [PATCH] Fix warning about bitfield in struct ref, Johannes Schindelin, (Wed Nov 21, 7:59 am)
speck-geostationary