1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

pidl/ws: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang

Port Wireshark commit f6b9e7a

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Sun Sep 28 20:57:13 2014 +0200

    PIDL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang

    Change-Id: Ibae478771b30d6e9ae07315985f1e71bc6b65423
    Reviewed-on: https://code.wireshark.org/review/4350
    Reviewed-by: Michael Mann <mmann78@netscape.net>

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
Aurelien Aptel 2016-02-05 14:43:04 +01:00 committed by Stefan Metzmacher
parent 54898557d8
commit 30e7be511e

View File

@ -690,7 +690,9 @@ sub Struct($$$$)
$self->indent;
$self->pidl_code($_) foreach (@$vars);
$self->pidl_code("proto_item *item = NULL;");
$self->pidl_code("proto_tree *tree = NULL;");
if($res) {
$self->pidl_code("proto_tree *tree = NULL;");
}
if (defined($doalign)) {
$self->pidl_code("dcerpc_info *di = (dcerpc_info *)pinfo->private_data;");
if ($doalign == 0) {
@ -715,7 +717,9 @@ sub Struct($$$$)
$self->pidl_code("if (parent_tree) {");
$self->indent;
$self->pidl_code("item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);");
$self->pidl_code("tree = proto_item_add_subtree(item, ett_$ifname\_$name);");
if($res) {
$self->pidl_code("tree = proto_item_add_subtree(item, ett_$ifname\_$name);");
}
$self->deindent;
$self->pidl_code("}");