[PATCH] Fix 2 clang warnings

Ira Cooper ira at samba.org
Mon Nov 24 08:08:47 MST 2014


>From 06161d210a6540f836f2e793ce2d352b8cad55bd Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 24 Nov 2014 14:34:24 +0100
Subject: [PATCH 1/2] dsdb: Remove a self-assignment

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source4/dsdb/samdb/ldb_modules/dirsync.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source4/dsdb/samdb/ldb_modules/dirsync.c
b/source4/dsdb/samdb/ldb_modules/dirsync.c
index c93189e..b5510ec 100644
--- a/source4/dsdb/samdb/ldb_modules/dirsync.c
+++ b/source4/dsdb/samdb/ldb_modules/dirsync.c
@@ -571,7 +571,6 @@ skip:
                             if (tmpel->values == NULL) {
                                 return ldb_oom(ldb);
                             }
-                            tmpel = tmpel;
                         }
                         tmpel->values[tmpel->num_values -1].data
=talloc_steal(tmpel->values, el->values[k].data);
                         tmpel->values[tmpel->num_values -1].length =
el->values[k].length;
--
1.9.1

I'm a bit concerned about this one. Matthieu, can you shed some light on
this line?  (I think the git blame pointed the finger at you...)

It really looks like it could be a compiler bug workaround or something
bizarre like that that?

Otherwise, it's clearly "right".  But lines like that.... scare me a bit.

The NTDB patch:

Reviewed-by: Ira Cooper <ira at samba.org>

-Ira


More information about the samba-technical mailing list