Commit 061407ec authored by Tapani Pälli's avatar Tapani Pälli
Browse files

nir: fix compiler warnings about implicit conversions



Instead of implicitly converting UINT64_MAX to operation destination
type, we explicitly set the correct max depending on type.

So instead of generating:

   uint8_t dst = (src0 + src1) < src0 ? (UINT64_MAX) : (src0 + src1);

we do:

   uint8_t dst = (src0 + src1) < src0 ? (UINT8_MAX) : (src0 + src1);

This clears following warnings during compilation:

  warning: implicit conversion from 'unsigned long' to 'uint1_t'
  warning: implicit conversion from 'unsigned long' to 'uint8_t'
  warning: implicit conversion from 'unsigned long' to 'uint16_t'
  warning: implicit conversion from 'unsigned long' to 'uint32_t'
Signed-off-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
parent 41f76dd5
Pipeline #28252 passed with stages
in 10 minutes and 33 seconds