mirror of
https://github.com/amd/blis.git
synced 2026-07-19 01:54:14 +00:00
Typecast l1mkr_t enum value prior to comparison.
Details:
- Typecast l1mkr_t enum value in bli_cntx.h to guint_t before testing for
out-of-range value. This is an attempt to pacify a strange warning from
clang on OS X that is seemingly the result of the following compiler
warning flag:
-Wtautological-constant-out-of-range-compare
This commit is contained in:
@@ -343,7 +343,7 @@ static func_t* bli_cntx_get_packm_kers( l1mkr_t ker_id, cntx_t* cntx )
|
||||
func_t* funcs = bli_cntx_packm_kers_buf( cntx );
|
||||
|
||||
// If the kernel id is beyond the bounds of the l1mkr_t enum, return NULL.
|
||||
if ( ker_id >= BLIS_NUM_PACKM_KERS ) return NULL;
|
||||
if ( ( guint_t )ker_id >= ( guint_t )BLIS_NUM_PACKM_KERS ) return NULL;
|
||||
|
||||
func_t* func = &funcs[ ker_id ];
|
||||
|
||||
@@ -362,7 +362,7 @@ static func_t* bli_cntx_get_unpackm_kers( l1mkr_t ker_id, cntx_t* cntx )
|
||||
func_t* funcs = bli_cntx_unpackm_kers_buf( cntx );
|
||||
|
||||
// If the kernel id is beyond the bounds of the l1mkr_t enum, return NULL.
|
||||
if ( ker_id >= BLIS_NUM_PACKM_KERS ) return NULL;
|
||||
if ( ( guint_t )ker_id >= ( guint_t )BLIS_NUM_UNPACKM_KERS ) return NULL;
|
||||
|
||||
func_t* func = &funcs[ ker_id ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user