aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-09-26 21:31:32 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-09-27 20:07:11 +0000
commitf0b5fb7a0445831af14c0e6cba4b29eae7032c2e (patch)
tree898ef33920a28ec5a9d8d6c057eae9fb4de0e93d
parent99f5c507d2ce327d73eb598e77af714f47a462f9 (diff)
PIDL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I7f6f974732b7905f4ea4686e1a79ca6fbef78fa8 Reviewed-on: https://code.wireshark.org/review/4319 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-dcerpc-atsvc.c6
-rw-r--r--epan/dissectors/packet-dcerpc-dfs.c6
-rw-r--r--epan/dissectors/packet-dcerpc-dnsserver.c8
-rw-r--r--epan/dissectors/packet-dcerpc-dssetup.c2
-rw-r--r--epan/dissectors/packet-dcerpc-eventlog.c4
-rw-r--r--epan/dissectors/packet-dcerpc-frsrpc.c6
-rw-r--r--epan/dissectors/packet-dcerpc-frstrans.c2
-rw-r--r--epan/dissectors/packet-dcerpc-initshutdown.c2
-rw-r--r--epan/dissectors/packet-dcerpc-lsa.c2
-rw-r--r--epan/dissectors/packet-dcerpc-mapi.c2
-rw-r--r--epan/dissectors/packet-dcerpc-samr.c10
-rw-r--r--epan/dissectors/packet-dcerpc-winreg.c8
-rw-r--r--epan/dissectors/pidl/winreg.cnf1
-rw-r--r--tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm2
14 files changed, 30 insertions, 31 deletions
diff --git a/epan/dissectors/packet-dcerpc-atsvc.c b/epan/dissectors/packet-dcerpc-atsvc.c
index 50c41edd2a..fec4bbccab 100644
--- a/epan/dissectors/packet-dcerpc-atsvc.c
+++ b/epan/dissectors/packet-dcerpc-atsvc.c
@@ -378,7 +378,7 @@ atsvc_dissect_bitmap_DaysOfMonth(tvbuff_t *tvb _U_, int offset _U_, packet_info
tree = proto_item_add_subtree(item,ett_atsvc_atsvc_DaysOfMonth);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -661,7 +661,7 @@ atsvc_dissect_bitmap_Flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo
tree = proto_item_add_subtree(item,ett_atsvc_atsvc_Flags);
}
- offset = dissect_ndr_uint8(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -738,7 +738,7 @@ atsvc_dissect_bitmap_DaysOfWeek(tvbuff_t *tvb _U_, int offset _U_, packet_info *
tree = proto_item_add_subtree(item,ett_atsvc_atsvc_DaysOfWeek);
}
- offset = dissect_ndr_uint8(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint8(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-dfs.c b/epan/dissectors/packet-dcerpc-dfs.c
index 695debd2d1..ab0c0e9bf1 100644
--- a/epan/dissectors/packet-dcerpc-dfs.c
+++ b/epan/dissectors/packet-dcerpc-dfs.c
@@ -678,7 +678,7 @@ netdfs_dissect_bitmap_dfs_VolumeState(tvbuff_t *tvb _U_, int offset _U_, packet_
tree = proto_item_add_subtree(item,ett_netdfs_dfs_VolumeState);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -857,7 +857,7 @@ netdfs_dissect_bitmap_dfs_StorageState(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_netdfs_dfs_StorageState);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1273,7 +1273,7 @@ netdfs_dissect_bitmap_dfs_PropertyFlags(tvbuff_t *tvb _U_, int offset _U_, packe
tree = proto_item_add_subtree(item,ett_netdfs_dfs_PropertyFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-dnsserver.c b/epan/dissectors/packet-dcerpc-dnsserver.c
index c8e4f92239..c0c2f1910a 100644
--- a/epan/dissectors/packet-dcerpc-dnsserver.c
+++ b/epan/dissectors/packet-dcerpc-dnsserver.c
@@ -772,7 +772,7 @@ dnsserver_dissect_bitmap_DNS_LOG_LEVELS(tvbuff_t *tvb _U_, int offset _U_, packe
tree = proto_item_add_subtree(item,ett_dnsserver_DNS_LOG_LEVELS);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -894,7 +894,7 @@ dnsserver_dissect_bitmap_DNS_RPC_PROTOCOLS(tvbuff_t *tvb _U_, int offset _U_, pa
tree = proto_item_add_subtree(item,ett_dnsserver_DNS_RPC_PROTOCOLS);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1034,7 +1034,7 @@ dnsserver_dissect_bitmap_DNS_SELECT_FLAGS(tvbuff_t *tvb _U_, int offset _U_, pac
tree = proto_item_add_subtree(item,ett_dnsserver_DNS_SELECT_FLAGS);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1133,7 +1133,7 @@ dnsserver_dissect_bitmap_DNS_RPC_NODE_FLAGS(tvbuff_t *tvb _U_, int offset _U_, p
tree = proto_item_add_subtree(item,ett_dnsserver_DNS_RPC_NODE_FLAGS);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-dssetup.c b/epan/dissectors/packet-dcerpc-dssetup.c
index 7c78ee8bbe..799832933b 100644
--- a/epan/dissectors/packet-dcerpc-dssetup.c
+++ b/epan/dissectors/packet-dcerpc-dssetup.c
@@ -180,7 +180,7 @@ dssetup_dissect_bitmap_DsRoleFlags(tvbuff_t *tvb _U_, int offset _U_, packet_inf
tree = proto_item_add_subtree(item,ett_dssetup_dssetup_DsRoleFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-eventlog.c b/epan/dissectors/packet-dcerpc-eventlog.c
index f11c873c18..ccf7de6e7a 100644
--- a/epan/dissectors/packet-dcerpc-eventlog.c
+++ b/epan/dissectors/packet-dcerpc-eventlog.c
@@ -410,7 +410,7 @@ eventlog_dissect_bitmap_eventlogReadFlags(tvbuff_t *tvb _U_, int offset _U_, pac
tree = proto_item_add_subtree(item,ett_eventlog_eventlogReadFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -479,7 +479,7 @@ eventlog_dissect_bitmap_eventlogEventTypes(tvbuff_t *tvb _U_, int offset _U_, pa
tree = proto_item_add_subtree(item,ett_eventlog_eventlogEventTypes);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-frsrpc.c b/epan/dissectors/packet-dcerpc-frsrpc.c
index e3fec29aaf..904aac8f54 100644
--- a/epan/dissectors/packet-dcerpc-frsrpc.c
+++ b/epan/dissectors/packet-dcerpc-frsrpc.c
@@ -904,7 +904,7 @@ frsrpc_dissect_bitmap_CommPktCoCmdFlags(tvbuff_t *tvb _U_, int offset _U_, packe
tree = proto_item_add_subtree(item,ett_frsrpc_frsrpc_CommPktCoCmdFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1082,7 +1082,7 @@ frsrpc_dissect_bitmap_CommPktCoCmdIFlags(tvbuff_t *tvb _U_, int offset _U_, pack
tree = proto_item_add_subtree(item,ett_frsrpc_frsrpc_CommPktCoCmdIFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1191,7 +1191,7 @@ frsrpc_dissect_bitmap_CommPktCoCmdContentCmd(tvbuff_t *tvb _U_, int offset _U_,
tree = proto_item_add_subtree(item,ett_frsrpc_frsrpc_CommPktCoCmdContentCmd);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-frstrans.c b/epan/dissectors/packet-dcerpc-frstrans.c
index f0cb9f74e9..8aa2efcdae 100644
--- a/epan/dissectors/packet-dcerpc-frstrans.c
+++ b/epan/dissectors/packet-dcerpc-frstrans.c
@@ -378,7 +378,7 @@ frstrans_dissect_bitmap_TransportFlags(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_frstrans_frstrans_TransportFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-initshutdown.c b/epan/dissectors/packet-dcerpc-initshutdown.c
index 7be7d4f8a5..b36c6126c7 100644
--- a/epan/dissectors/packet-dcerpc-initshutdown.c
+++ b/epan/dissectors/packet-dcerpc-initshutdown.c
@@ -217,7 +217,7 @@ initshutdown_dissect_bitmap_ReasonFlags(tvbuff_t *tvb _U_, int offset _U_, packe
tree = proto_item_add_subtree(item,ett_initshutdown_initshutdown_ReasonFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-lsa.c b/epan/dissectors/packet-dcerpc-lsa.c
index 852311fbad..f0506836e1 100644
--- a/epan/dissectors/packet-dcerpc-lsa.c
+++ b/epan/dissectors/packet-dcerpc-lsa.c
@@ -1646,7 +1646,7 @@ lsarpc_dissect_bitmap_security_secinfo(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_lsarpc_security_secinfo);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-mapi.c b/epan/dissectors/packet-dcerpc-mapi.c
index 9203ae16bc..478f0909a9 100644
--- a/epan/dissectors/packet-dcerpc-mapi.c
+++ b/epan/dissectors/packet-dcerpc-mapi.c
@@ -9226,7 +9226,7 @@ mapi_dissect_bitmap_ulEventType(tvbuff_t *tvb _U_, int offset _U_, packet_info *
tree = proto_item_add_subtree(item,ett_mapi_ulEventType);
}
- offset = dissect_ndr_uint16(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-samr.c b/epan/dissectors/packet-dcerpc-samr.c
index b30888927b..40102f79a5 100644
--- a/epan/dissectors/packet-dcerpc-samr.c
+++ b/epan/dissectors/packet-dcerpc-samr.c
@@ -2364,7 +2364,7 @@ samr_dissect_bitmap_AcctFlags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pi
tree = proto_item_add_subtree(item,ett_samr_samr_AcctFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -2794,7 +2794,7 @@ samr_dissect_bitmap_PasswordProperties(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_samr_samr_PasswordProperties);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -3897,7 +3897,7 @@ samr_dissect_bitmap_GroupAttrs(tvbuff_t *tvb _U_, int offset _U_, packet_info *p
tree = proto_item_add_subtree(item,ett_samr_samr_GroupAttrs);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -5958,7 +5958,7 @@ samr_dissect_bitmap_FieldsPresent(tvbuff_t *tvb _U_, int offset _U_, packet_info
tree = proto_item_add_subtree(item,ett_samr_samr_FieldsPresent);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -8341,7 +8341,7 @@ samr_dissect_bitmap_ValidateFieldsPresent(tvbuff_t *tvb _U_, int offset _U_, pac
tree = proto_item_add_subtree(item,ett_samr_samr_ValidateFieldsPresent);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/packet-dcerpc-winreg.c b/epan/dissectors/packet-dcerpc-winreg.c
index 0b91ae19d0..c1bbd2e454 100644
--- a/epan/dissectors/packet-dcerpc-winreg.c
+++ b/epan/dissectors/packet-dcerpc-winreg.c
@@ -665,7 +665,7 @@ winreg_dissect_bitmap_security_secinfo(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_winreg_security_secinfo);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -923,7 +923,7 @@ winreg_dissect_bitmap_KeyOptions(tvbuff_t *tvb _U_, int offset _U_, packet_info
tree = proto_item_add_subtree(item,ett_winreg_winreg_KeyOptions);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1171,7 +1171,7 @@ winreg_dissect_bitmap_NotifyChangeType(tvbuff_t *tvb _U_, int offset _U_, packet
tree = proto_item_add_subtree(item,ett_winreg_winreg_NotifyChangeType);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
@@ -1238,7 +1238,7 @@ winreg_dissect_bitmap_RestoreKeyFlags(tvbuff_t *tvb _U_, int offset _U_, packet_
tree = proto_item_add_subtree(item,ett_winreg_winreg_RestoreKeyFlags);
}
- offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
+ offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, -1, &flags);
proto_item_append_text(item, ": ");
if (!flags)
diff --git a/epan/dissectors/pidl/winreg.cnf b/epan/dissectors/pidl/winreg.cnf
index a4d89d77d2..2e8a603037 100644
--- a/epan/dissectors/pidl/winreg.cnf
+++ b/epan/dissectors/pidl/winreg.cnf
@@ -2,7 +2,6 @@ TYPE lsa_StringLarge "offset=lsarpc_dissect_struct_lsa_StringLarge(tvb, offset,
TYPE winreg_Type "offset=misc_dissect_enum_winreg_Type(tvb, offset, pinfo, tree, di, drep, @HF@, @PARAM@);" FT_NONE BASE_NONE 0 NULL NULL
IMPORT security_secinfo offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL);
-
#
# Make all instances of an access mask use the same hf field display filter
# name
diff --git a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 74dc12d83a..456d7ff506 100644
--- a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -221,7 +221,7 @@ sub Bitmap($$$$)
$self->deindent;
$self->pidl_code("}\n");
- $self->pidl_code("offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, NULL, di, drep, -1, &flags);");
+ $self->pidl_code("offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, di, drep, -1, &flags);");
$self->pidl_code("proto_item_append_text(item, \": \");\n");
$self->pidl_code("if (!flags)");