intel / intel-vaapi-driver

VA-API user mode driver for Intel GEN Graphics family
https://01.org/linuxmedia
Other
308 stars 125 forks source link

Compare uint32_t with zero #479

Open QiAnXinCodeSafe opened 5 years ago

QiAnXinCodeSafe commented 5 years ago

https://github.com/intel/intel-vaapi-driver/blob/e60af2163cc47d1820cf4b22b71321e3c2b0c9f2/src/i965_drv_video.c#L6906

In the compare expr 'y_offset<0' the sub expr 'y_offset' is unsigned, and the value of sub expr '0' is always 0, so the result of this comparation will always be false

'y_offset' is defined here

https://github.com/intel/intel-vaapi-driver/blob/e60af2163cc47d1820cf4b22b71321e3c2b0c9f2/src/i965_drv_video.c#L6798