From 8428d3a927e46d3be13a8d52d04b7697b0b99b80 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 14 Jul 2016 18:28:00 -0700 Subject: Squelch compiler warnings. Cast some numerical values to wtap_block_type_t. Change-Id: I56651c62045880638175c39174341feffb4b1068 Reviewed-on: https://code.wireshark.org/review/16451 Reviewed-by: Guy Harris --- wiretap/wtap_opttypes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wiretap/wtap_opttypes.c') diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c index c5b4f62262..27b0fe28ed 100644 --- a/wiretap/wtap_opttypes.c +++ b/wiretap/wtap_opttypes.c @@ -127,7 +127,7 @@ int wtap_opttype_register_custom_block_type(const char* name, const char* descri /* This shouldn't happen, so flag it for fixing */ g_assert(num_custom_blocks < MAX_WTAP_BLOCK_CUSTOM); - block_type = WTAP_BLOCK_END_OF_LIST+num_custom_blocks; + block_type = (wtap_block_type_t)(WTAP_BLOCK_END_OF_LIST+num_custom_blocks); custom_blocktype_list[num_custom_blocks].name = name; custom_blocktype_list[num_custom_blocks].description = description; @@ -191,7 +191,7 @@ wtap_block_t wtap_block_create(wtap_block_type_t block_type) { wtap_block_t block; - if (block_type >= (WTAP_BLOCK_END_OF_LIST+num_custom_blocks)) + if (block_type >= (wtap_block_type_t)(WTAP_BLOCK_END_OF_LIST+num_custom_blocks)) return NULL; block = g_new(struct wtap_block, 1); -- cgit v1.2.3