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 <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-07-14 18:28:00 -07:00
parent f8b738016e
commit 8428d3a927
1 changed files with 2 additions and 2 deletions

View File

@ -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);