[PATCH] Fix the O3 developer build

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Mar 16 00:47:57 MDT 2015


On Sun, Mar 15, 2015 at 10:53:07PM +0100, Stefan (metze) Metzmacher wrote:
> Hi Volker,
> 
> > Review&push appreciated!
> 
> Can you split this into two commits?
> 
> I'd also prefer '{}' instead of '{0}'.
> 
> It seems '{0}' is not needed in the variable declaration.

I'm not sure about that. I'd love to see the relevant
sections of the C standard before I am convinced. Do you
have pointers to that? Until then, I'll keep the patches
private, so that others are not bothered.

> I'm also wondering if we should use -O3 for samba-ctdb in
> autobuild. The attached patch should do that, but it's not tested yet.

That won't help much. Different gcc versions on different
platforms complain about different situations.

Attached find the uncontroversial part re-submitted.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 2dbc8cd17e1ab4ef8db523a49aae73caac015d68 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 16 Mar 2015 07:45:28 +0100
Subject: [PATCH] passdb: Fix the O3 developer build

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/passdb/pdb_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index b8247f2..3a3fe2e 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1505,8 +1505,8 @@ static bool pdb_default_sid_to_id(struct pdb_methods *methods,
 	if (sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) {
 		const char *name;
 		enum lsa_SidType type;
-		uid_t uid;
-		gid_t gid;
+		uid_t uid = (uid_t)-1;
+		gid_t gid = (gid_t)-1;
 		/* Here we might have users as well as groups and aliases */
 		ret = lookup_global_sam_rid(mem_ctx, rid, &name, &type, &uid, &gid);
 		if (ret) {
-- 
1.9.1



More information about the samba-technical mailing list