mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00

This patch fixes various warnings from MSVC. - Several "truncation from 'double' to 'float'" warnings, easily fixed by appending 'f' to literals. - Some "signed/unsigned mismatch" warnings. In read_tag_lutType(), MSVC is apparently promoting the multiplication of a uint8_t and a uint16_t to an int32_t, oddly enough. A uint32_t cast fixes the warning. - |offset| was unused in qcms_data_create_rbg_with_gamma(). - A couple of "overflow in floating-point constant arithmetic" warnings involving INFINITY in transform_util.c. There is some type confusion here -- in C99 HUGE_VAL is a double and INFINITY is a float. So the HUGE_VAL here should actualy be HUGE_VALF. But, strangely enough, that isn't enough to avoid the warning, I don't know why. However, it turns out that any non-positive value for |interval| will have the same effect, so I just removed all the INFINITY/HUGE_VAL stuff and used -1 instead. It also fixes an ARM-only GCC warning. - "'__force_align_arg_pointer__' attribute directive ignored". This is an x86-only attribute. Instead of disabling it on x86-64, instead enable it on i386 (which avoids enabling it uselessly on ARM). --HG-- extra : rebase_source : 61015b7e48aebd58035fc222abf076e79a99a972