{"thread":{"id":"10913","subject":"[PATCH] Fix warning about bitfield in struct ref","startedAt":"2007-11-18T09:31:37Z","lastAt":"2007-11-21T11:59:30Z","messageCount":4,"participants":["Shawn O. Pearce","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"60214","messageId":"20071118093137.GA2196@spearce.org","threadId":"10913","inReplyTo":null,"subject":"[PATCH] Fix warning about bitfield in struct ref","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-11-18T09:31:37Z","receivedAt":"2007-11-18T09:31:37Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"cache.h:503: warning: type of bit-field 'force' is a GCC extension\ncache.h:504: warning: type of bit-field 'merge' is a GCC extension\ncache.h:505: warning: type of bit-field 'nonfastforward' is a GCC extension\ncache.h:506: warning: type of bit-field 'deletion' is a GCC extension\n\nSo we change it to an 'unsigned int' which is not a GCC extension.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n cache.h |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex ba9178f..65e019e 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -500,10 +500,10 @@ struct ref {\n \tstruct ref *next;\n \tunsigned char old_sha1[20];\n \tunsigned char new_sha1[20];\n-\tunsigned char force : 1;\n-\tunsigned char merge : 1;\n-\tunsigned char nonfastforward : 1;\n-\tunsigned char deletion : 1;\n+\tunsigned int force:1,\n+\t\tmerge:1,\n+\t\tnonfastforward:1,\n+\t\tdeletion:1;\n \tenum {\n \t\tREF_STATUS_NONE = 0,\n \t\tREF_STATUS_OK,\n-- \n1.5.3.5.1794.g083e\n"},{"id":"60382","messageId":"Pine.LNX.4.64.0711200058270.16728@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"10913","inReplyTo":"20071118093137.GA2196@spearce.org","subject":"Re: [PATCH] Fix warning about bitfield in struct ref","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-19T23:58:58Z","receivedAt":"2007-11-19T23:58:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 18 Nov 2007, Shawn O. Pearce wrote:\n\n> +\tunsigned int force:1,\n\nIsn't this \"unsigned force:1\" everywhere else in git's source?\n\nCiao,\nDscho\n"},{"id":"60465","messageId":"20071121065155.GT14735@spearce.org","threadId":"10913","inReplyTo":"Pine.LNX.4.64.0711200058270.16728@wbgn129.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Fix warning about bitfield in struct ref","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-11-21T06:51:55Z","receivedAt":"2007-11-21T06:51:55Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> On Sun, 18 Nov 2007, Shawn O. Pearce wrote:\n> \n> > +\tunsigned int force:1,\n> \n> Isn't this \"unsigned force:1\" everywhere else in git's source?\n\nThat may be true but Junio already applied it as \"unsigned int\"\nas I wrote it.  Anyway \"unsigned int\" and \"unsigned\" will give the\nsame result here; I just typed 4 characters more than I needed to.\n\n-- \nShawn.\n"},{"id":"60497","messageId":"Pine.LNX.4.64.0711211158450.27959@racer.site","threadId":"10913","inReplyTo":"20071121065155.GT14735@spearce.org","subject":"Re: [PATCH] Fix warning about bitfield in struct ref","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-11-21T11:59:30Z","receivedAt":"2007-11-21T11:59:30Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 21 Nov 2007, Shawn O. Pearce wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > On Sun, 18 Nov 2007, Shawn O. Pearce wrote:\n> > \n> > > +\tunsigned int force:1,\n> > \n> > Isn't this \"unsigned force:1\" everywhere else in git's source?\n> \n> That may be true but Junio already applied it as \"unsigned int\"\n> as I wrote it.\n\nYes, I saw that _after_ I wrote this mail.\n\n> Anyway \"unsigned int\" and \"unsigned\" will give the same result here; I \n> just typed 4 characters more than I needed to.\n\nNo big problem.\n\nCiao,\nDscho\n"}]}