Skip to content

Commit

Permalink
Fix some (trivial) warnings in pidl dissectors
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmath committed Apr 24, 2024
1 parent 6966cdb commit 4205eb2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 deletions.
38 changes: 19 additions & 19 deletions epan/dissectors/packet-dcerpc-eventlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ eventlog_dissect_element_Record_strings(tvbuff_t *tvb, int offset, packet_info *


/* IDL: bitmap { */
/* IDL: EVENTLOG_SEQUENTIAL_READ = 0x0001 , */
/* IDL: EVENTLOG_SEEK_READ = 0x0002 , */
/* IDL: EVENTLOG_FORWARDS_READ = 0x0004 , */
/* IDL: EVENTLOG_BACKWARDS_READ = 0x0008 , */
/* IDL: EVENTLOG_SEQUENTIAL_READ = 0x00000001 , */
/* IDL: EVENTLOG_SEEK_READ = 0x00000002 , */
/* IDL: EVENTLOG_FORWARDS_READ = 0x00000004 , */
/* IDL: EVENTLOG_BACKWARDS_READ = 0x00000008 , */
/* IDL: } */

int
Expand Down Expand Up @@ -404,12 +404,12 @@ eventlog_dissect_bitmap_eventlogReadFlags(tvbuff_t *tvb _U_, int offset _U_, pac


/* IDL: bitmap { */
/* IDL: EVENTLOG_SUCCESS = 0x0000 , */
/* IDL: EVENTLOG_ERROR_TYPE = 0x0001 , */
/* IDL: EVENTLOG_WARNING_TYPE = 0x0002 , */
/* IDL: EVENTLOG_INFORMATION_TYPE = 0x0004 , */
/* IDL: EVENTLOG_AUDIT_SUCCESS = 0x0008 , */
/* IDL: EVENTLOG_AUDIT_FAILURE = 0x0010 , */
/* IDL: EVENTLOG_SUCCESS = 0x00000000 , */
/* IDL: EVENTLOG_ERROR_TYPE = 0x00000001 , */
/* IDL: EVENTLOG_WARNING_TYPE = 0x00000002 , */
/* IDL: EVENTLOG_INFORMATION_TYPE = 0x00000004 , */
/* IDL: EVENTLOG_AUDIT_SUCCESS = 0x00000008 , */
/* IDL: EVENTLOG_AUDIT_FAILURE = 0x00000010 , */
/* IDL: } */

int
Expand Down Expand Up @@ -2182,23 +2182,23 @@ void proto_register_dcerpc_eventlog(void)
{ &hf_eventlog_Record_string,
{ "string", "eventlog.Record.string", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
{ &hf_eventlog_eventlogEventTypes_EVENTLOG_AUDIT_FAILURE,
{ "EVENTLOG AUDIT FAILURE", "eventlog.eventlogEventTypes.EVENTLOG_AUDIT_FAILURE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_AUDIT_FAILURE_tfs), ( 0x0010 ), NULL, HFILL }},
{ "EVENTLOG AUDIT FAILURE", "eventlog.eventlogEventTypes.EVENTLOG_AUDIT_FAILURE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_AUDIT_FAILURE_tfs), ( 0x00000010 ), NULL, HFILL }},
{ &hf_eventlog_eventlogEventTypes_EVENTLOG_AUDIT_SUCCESS,
{ "EVENTLOG AUDIT SUCCESS", "eventlog.eventlogEventTypes.EVENTLOG_AUDIT_SUCCESS", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_AUDIT_SUCCESS_tfs), ( 0x0008 ), NULL, HFILL }},
{ "EVENTLOG AUDIT SUCCESS", "eventlog.eventlogEventTypes.EVENTLOG_AUDIT_SUCCESS", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_AUDIT_SUCCESS_tfs), ( 0x00000008 ), NULL, HFILL }},
{ &hf_eventlog_eventlogEventTypes_EVENTLOG_ERROR_TYPE,
{ "EVENTLOG ERROR TYPE", "eventlog.eventlogEventTypes.EVENTLOG_ERROR_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_ERROR_TYPE_tfs), ( 0x0001 ), NULL, HFILL }},
{ "EVENTLOG ERROR TYPE", "eventlog.eventlogEventTypes.EVENTLOG_ERROR_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_ERROR_TYPE_tfs), ( 0x00000001 ), NULL, HFILL }},
{ &hf_eventlog_eventlogEventTypes_EVENTLOG_INFORMATION_TYPE,
{ "EVENTLOG INFORMATION TYPE", "eventlog.eventlogEventTypes.EVENTLOG_INFORMATION_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_INFORMATION_TYPE_tfs), ( 0x0004 ), NULL, HFILL }},
{ "EVENTLOG INFORMATION TYPE", "eventlog.eventlogEventTypes.EVENTLOG_INFORMATION_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_INFORMATION_TYPE_tfs), ( 0x00000004 ), NULL, HFILL }},
{ &hf_eventlog_eventlogEventTypes_EVENTLOG_WARNING_TYPE,
{ "EVENTLOG WARNING TYPE", "eventlog.eventlogEventTypes.EVENTLOG_WARNING_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_WARNING_TYPE_tfs), ( 0x0002 ), NULL, HFILL }},
{ "EVENTLOG WARNING TYPE", "eventlog.eventlogEventTypes.EVENTLOG_WARNING_TYPE", FT_BOOLEAN, 32, TFS(&eventlogEventTypes_EVENTLOG_WARNING_TYPE_tfs), ( 0x00000002 ), NULL, HFILL }},
{ &hf_eventlog_eventlogReadFlags_EVENTLOG_BACKWARDS_READ,
{ "EVENTLOG BACKWARDS READ", "eventlog.eventlogReadFlags.EVENTLOG_BACKWARDS_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_BACKWARDS_READ_tfs), ( 0x0008 ), NULL, HFILL }},
{ "EVENTLOG BACKWARDS READ", "eventlog.eventlogReadFlags.EVENTLOG_BACKWARDS_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_BACKWARDS_READ_tfs), ( 0x00000008 ), NULL, HFILL }},
{ &hf_eventlog_eventlogReadFlags_EVENTLOG_FORWARDS_READ,
{ "EVENTLOG FORWARDS READ", "eventlog.eventlogReadFlags.EVENTLOG_FORWARDS_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_FORWARDS_READ_tfs), ( 0x0004 ), NULL, HFILL }},
{ "EVENTLOG FORWARDS READ", "eventlog.eventlogReadFlags.EVENTLOG_FORWARDS_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_FORWARDS_READ_tfs), ( 0x00000004 ), NULL, HFILL }},
{ &hf_eventlog_eventlogReadFlags_EVENTLOG_SEEK_READ,
{ "EVENTLOG SEEK READ", "eventlog.eventlogReadFlags.EVENTLOG_SEEK_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_SEEK_READ_tfs), ( 0x0002 ), NULL, HFILL }},
{ "EVENTLOG SEEK READ", "eventlog.eventlogReadFlags.EVENTLOG_SEEK_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_SEEK_READ_tfs), ( 0x00000002 ), NULL, HFILL }},
{ &hf_eventlog_eventlogReadFlags_EVENTLOG_SEQUENTIAL_READ,
{ "EVENTLOG SEQUENTIAL READ", "eventlog.eventlogReadFlags.EVENTLOG_SEQUENTIAL_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_SEQUENTIAL_READ_tfs), ( 0x0001 ), NULL, HFILL }},
{ "EVENTLOG SEQUENTIAL READ", "eventlog.eventlogReadFlags.EVENTLOG_SEQUENTIAL_READ", FT_BOOLEAN, 32, TFS(&eventlogReadFlags_EVENTLOG_SEQUENTIAL_READ_tfs), ( 0x00000001 ), NULL, HFILL }},
{ &hf_eventlog_eventlog_BackupEventLogW_backupfilename,
{ "Backupfilename", "eventlog.eventlog_BackupEventLogW.backupfilename", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
{ &hf_eventlog_eventlog_BackupEventLogW_handle,
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-dcerpc-frsrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_inf
int old_offset;
old_offset = offset;
if (parent_tree) {
item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_frsrpc_frsrpc_CommPktChunk);
}
offset = frsrpc_dissect_element_CommPktChunk_type(tvb, offset, pinfo, tree, di, drep, &type);
Expand Down Expand Up @@ -708,7 +708,7 @@ frsrpc_dissect_struct_frsrpc_CommPktChunkCtr(tvbuff_t *tvb, int offset, packet_i
guint32 remaining = tvb_reported_length_remaining(tvb, offset);
int align_status = di->no_align;
if (remaining > 0) {
proto_item *item = proto_tree_add_item(tree, hf_index, tvb, offset, -1, TRUE);
proto_item *item = proto_tree_add_item(tree, hf_index, tvb, offset, -1, ENC_NA);
proto_tree *subtree = proto_item_add_subtree(item, ett_ChunkCtr);
di->no_align = 1;
while (remaining > 0) {
Expand Down
20 changes: 10 additions & 10 deletions epan/dissectors/pidl/eventlog/eventlog.idl
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
] interface eventlog
{
typedef bitmap {
EVENTLOG_SEQUENTIAL_READ = 0x0001,
EVENTLOG_SEEK_READ = 0x0002,
EVENTLOG_FORWARDS_READ = 0x0004,
EVENTLOG_BACKWARDS_READ = 0x0008
EVENTLOG_SEQUENTIAL_READ = 0x00000001,
EVENTLOG_SEEK_READ = 0x00000002,
EVENTLOG_FORWARDS_READ = 0x00000004,
EVENTLOG_BACKWARDS_READ = 0x00000008
} eventlogReadFlags;

typedef bitmap {
EVENTLOG_SUCCESS = 0x0000,
EVENTLOG_ERROR_TYPE = 0x0001,
EVENTLOG_WARNING_TYPE = 0x0002,
EVENTLOG_INFORMATION_TYPE = 0x0004,
EVENTLOG_AUDIT_SUCCESS = 0x0008,
EVENTLOG_AUDIT_FAILURE = 0x0010
EVENTLOG_SUCCESS = 0x00000000,
EVENTLOG_ERROR_TYPE = 0x00000001,
EVENTLOG_WARNING_TYPE = 0x00000002,
EVENTLOG_INFORMATION_TYPE = 0x00000004,
EVENTLOG_AUDIT_SUCCESS = 0x00000008,
EVENTLOG_AUDIT_FAILURE = 0x00000010
} eventlogEventTypes;

typedef struct {
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/pidl/frsrpc/frsrpc.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ frsrpc_dissect_struct_CommPktChunk(tvbuff_t *tvb _U_, int offset _U_, packet_inf
old_offset = offset;

if (parent_tree) {
item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_frsrpc_frsrpc_CommPktChunk);
}

Expand Down Expand Up @@ -100,7 +100,7 @@ frsrpc_dissect_struct_frsrpc_CommPktChunkCtr(tvbuff_t *tvb, int offset, packet_i
int align_status = di->no_align;

if (remaining > 0) {
proto_item *item = proto_tree_add_item(tree, hf_index, tvb, offset, -1, TRUE);
proto_item *item = proto_tree_add_item(tree, hf_index, tvb, offset, -1, ENC_NA);
proto_tree *subtree = proto_item_add_subtree(item, ett_ChunkCtr);
di->no_align = 1;
while (remaining > 0) {
Expand Down

0 comments on commit 4205eb2

Please sign in to comment.