[PATCH] Fix 2 clang warnings

Jeremy Allison jra at samba.org
Mon Nov 24 10:45:30 MST 2014


On Mon, Nov 24, 2014 at 10:08:47AM -0500, Ira Cooper wrote:
> >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.

I'm going with 'clearly "right"' :-).

Reviewed + pushed.

Cheers,

	Jeremy.


More information about the samba-technical mailing list