syntax error in source3/locking/brlock.c

Christof Schmitt cs at samba.org
Wed Mar 11 17:13:29 MDT 2015


On Wed, Mar 11, 2015 at 08:41:32PM +0100, Michael Adam wrote:
> On 2015-03-11 at 12:28 -0700, Christof Schmitt wrote:
> > On Wed, Mar 11, 2015 at 06:53:44PM +0100, Michael Adam wrote:
> > > Thanks!
> > > 
> > > If Christof is happy with the partial patch,
> > > I am hereby granting my reviewed-by.
> > 
> > Yes, i will provide a patch just for the one instance. As mentioned
> > earlier, we should defer all the other changes until gcc no longer
> > prints the warnings.
> > 
> > Thanks for the reviewed-by, i will add it to the patch.
> 
> The patch is essentially already present in bugzilla.

Ok, i included the bugzilla link in the patch description and pushed it
to autobuild with your sign-off. Once that is finished, we can
cherry-pick the patch for 4.2.

The patch is also attached here for completeness.

Christof
-------------- next part --------------
From 23a34dcc07968aec80c64ccc5d8568e08504abdd Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 11 Mar 2015 15:54:55 -0700
Subject: [PATCH] brlock: Use 0 instead of empty initializer list

C does not allow empty initializer lists. Although gcc accepts that, the
SunOS compiler fails in this case with an error.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11153

Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
---
 source3/locking/brlock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 7fd3783..46401a0 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -2014,7 +2014,7 @@ static void brl_get_locks_readonly_parser(TDB_DATA key, TDB_DATA data,
 		*state->br_lock = NULL;
 		return;
 	}
-	*br_lck = (struct byte_range_lock) {};
+	*br_lck = (struct byte_range_lock) { 0 };
 	if (!brl_parse_data(br_lck, data)) {
 		*state->br_lock = NULL;
 		return;
-- 
1.7.1



More information about the samba-technical mailing list