Fix Wpointer-sign warnings.
Change-Id: I69a266bc945441bc9351b97bd1de0af7f9be46a0 Reviewed-on: https://code.wireshark.org/review/37768 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
8a4e53cbed
commit
2b7975db54
|
@ -603,7 +603,7 @@ static const range_string dynamic_tag_rvals[] = {
|
||||||
typedef struct _segment_info_t {
|
typedef struct _segment_info_t {
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
guint64 size;
|
guint64 size;
|
||||||
const guint8 *name;
|
const char *name;
|
||||||
} segment_info_t;
|
} segment_info_t;
|
||||||
|
|
||||||
void proto_register_elf(void);
|
void proto_register_elf(void);
|
||||||
|
@ -1094,7 +1094,7 @@ dissect_eh_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *segment_tree,
|
||||||
tvb, offset, 1, machine_encoding);
|
tvb, offset, 1, machine_encoding);
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
augmentation_string = tvb_get_const_stringz(tvb, offset, &size);
|
augmentation_string = (const gchar*)tvb_get_const_stringz(tvb, offset, &size);
|
||||||
proto_tree_add_item(entry_tree, hf_elf_eh_frame_augmentation_string,
|
proto_tree_add_item(entry_tree, hf_elf_eh_frame_augmentation_string,
|
||||||
tvb, offset, size, machine_encoding);
|
tvb, offset, size, machine_encoding);
|
||||||
offset += size;
|
offset += size;
|
||||||
|
@ -1185,7 +1185,7 @@ dissect_elf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||||
guint16 shstrndx;
|
guint16 shstrndx;
|
||||||
guint64 shstrtab_offset;
|
guint64 shstrtab_offset;
|
||||||
guint32 sh_name;
|
guint32 sh_name;
|
||||||
const guint8 *section_name;
|
const char *section_name;
|
||||||
guint64 length;
|
guint64 length;
|
||||||
guint64 segment_offset;
|
guint64 segment_offset;
|
||||||
guint64 segment_size;
|
guint64 segment_size;
|
||||||
|
@ -1471,7 +1471,7 @@ dissect_elf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||||
tvb_get_ntoh64(tvb, value_guard(length)) : tvb_get_letoh64(tvb, value_guard(length));
|
tvb_get_ntoh64(tvb, value_guard(length)) : tvb_get_letoh64(tvb, value_guard(length));
|
||||||
}
|
}
|
||||||
|
|
||||||
section_name = tvb_get_const_stringz(tvb, value_guard(shstrtab_offset + sh_name), NULL);
|
section_name = (const char *)tvb_get_const_stringz(tvb, value_guard(shstrtab_offset + sh_name), NULL);
|
||||||
|
|
||||||
if (register_size == REGISTER_64_SIZE && machine_encoding == ENC_BIG_ENDIAN) {
|
if (register_size == REGISTER_64_SIZE && machine_encoding == ENC_BIG_ENDIAN) {
|
||||||
offset += 4;
|
offset += 4;
|
||||||
|
@ -1546,7 +1546,7 @@ dissect_elf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||||
tvb_get_ntoh64(tvb, value_guard(length)) : tvb_get_letoh64(tvb, value_guard(length));
|
tvb_get_ntoh64(tvb, value_guard(length)) : tvb_get_letoh64(tvb, value_guard(length));
|
||||||
}
|
}
|
||||||
|
|
||||||
section_name = tvb_get_const_stringz(tvb, value_guard(shstrtab_offset + sh_name), NULL);
|
section_name = (const char*)tvb_get_const_stringz(tvb, value_guard(shstrtab_offset + sh_name), NULL);
|
||||||
if (section_name)
|
if (section_name)
|
||||||
proto_item_append_text(sh_entry_item, ": %s", section_name);
|
proto_item_append_text(sh_entry_item, ": %s", section_name);
|
||||||
|
|
||||||
|
|
|
@ -520,7 +520,7 @@ process_app0_segment(proto_tree *tree, tvbuff_t *tvb, guint32 len,
|
||||||
|
|
||||||
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
||||||
|
|
||||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
str = (char *)tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
||||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
||||||
if (strcmp(str, "JFIF") == 0) {
|
if (strcmp(str, "JFIF") == 0) {
|
||||||
/* Version */
|
/* Version */
|
||||||
|
@ -599,7 +599,7 @@ process_app1_segment(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint3
|
||||||
proto_tree_add_item(subtree, hf_len, tvb, offset, 2, ENC_BIG_ENDIAN);
|
proto_tree_add_item(subtree, hf_len, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
|
||||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_size, ENC_ASCII);
|
str = (char*)tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &str_size, ENC_ASCII);
|
||||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, offset, str_size, ENC_ASCII|ENC_NA);
|
ti = proto_tree_add_item(subtree, hf_identifier, tvb, offset, str_size, ENC_ASCII|ENC_NA);
|
||||||
offset += str_size;
|
offset += str_size;
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ process_app2_segment(proto_tree *tree, tvbuff_t *tvb, guint32 len,
|
||||||
|
|
||||||
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
proto_tree_add_item(subtree, hf_len, tvb, 2, 2, ENC_BIG_ENDIAN);
|
||||||
|
|
||||||
str = tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
str = (char*)tvb_get_stringz_enc(wmem_packet_scope(), tvb, 4, &str_size, ENC_ASCII);
|
||||||
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
ti = proto_tree_add_item(subtree, hf_identifier, tvb, 4, str_size, ENC_ASCII|ENC_NA);
|
||||||
if (strcmp(str, "FPXR") == 0) {
|
if (strcmp(str, "FPXR") == 0) {
|
||||||
proto_tree_add_item(tree, hf_exif_flashpix_marker, tvb, 0, -1, ENC_NA);
|
proto_tree_add_item(tree, hf_exif_flashpix_marker, tvb, 0, -1, ENC_NA);
|
||||||
|
@ -751,10 +751,10 @@ dissect_jfif(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
||||||
return 0;
|
return 0;
|
||||||
/* Check identifier field in first App segment is "JFIF", although "Exif" from App1
|
/* Check identifier field in first App segment is "JFIF", although "Exif" from App1
|
||||||
can/does appear here too... */
|
can/does appear here too... */
|
||||||
if (tvb_memeql(tvb, 6, "Exif", 5) == 0) {
|
if (tvb_memeql(tvb, 6, (const guint8*)"Exif", 5) == 0) {
|
||||||
show_first_identifier_not_jfif = TRUE;
|
show_first_identifier_not_jfif = TRUE;
|
||||||
}
|
}
|
||||||
else if (tvb_memeql(tvb, 6, "JFIF", 5)) {
|
else if (tvb_memeql(tvb, 6, (const guint8*)"JFIF", 5)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1156,7 +1156,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
|
||||||
|
|
||||||
proto_tree_add_item(option_tree, hf_pcapng_option_data_packet_drop_count, tvb, offset, 8, encoding);
|
proto_tree_add_item(option_tree, hf_pcapng_option_data_packet_drop_count, tvb, offset, 8, encoding);
|
||||||
value.u64 = tvb_get_guint64(tvb, offset, encoding);
|
value.u64 = tvb_get_guint64(tvb, offset, encoding);
|
||||||
str = wmem_strdup_printf(wmem_packet_scope(), "%"G_GUINT64_FORMAT, value.u64);
|
str = (const guint8*)wmem_strdup_printf(wmem_packet_scope(), "%"G_GUINT64_FORMAT, value.u64);
|
||||||
offset += 8;
|
offset += 8;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1165,7 +1165,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
|
||||||
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
||||||
offset += option_length;
|
offset += option_length;
|
||||||
|
|
||||||
str = wmem_strdup_printf(wmem_packet_scope(), "%u", value.u32);
|
str = (const guint8*)wmem_strdup_printf(wmem_packet_scope(), "%u", value.u32);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 32770: /* Darwin Service Type */
|
case 32770: /* Darwin Service Type */
|
||||||
|
@ -1173,7 +1173,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
|
||||||
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
||||||
offset += option_length;
|
offset += option_length;
|
||||||
|
|
||||||
str = wmem_strdup_printf(wmem_packet_scope(), "%s", val_to_str_const(value.u32, option_code_darwin_svc_class_vals, "Unknown"));
|
str = (const guint8*)wmem_strdup_printf(wmem_packet_scope(), "%s", val_to_str_const(value.u32, option_code_darwin_svc_class_vals, "Unknown"));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 32771: /* Darwin Effective DPEB ID */
|
case 32771: /* Darwin Effective DPEB ID */
|
||||||
|
@ -1181,7 +1181,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
|
||||||
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
value.u32 = tvb_get_guint32(tvb, offset, encoding);
|
||||||
offset += option_length;
|
offset += option_length;
|
||||||
|
|
||||||
str = wmem_strdup_printf(wmem_packet_scope(), "%u", value.u32);
|
str = (const guint8*)wmem_strdup_printf(wmem_packet_scope(), "%u", value.u32);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue