forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1205533 - Fix and disallow warnings in gfx/qcms/. r=jrmuizel.
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
- Loading branch information
1 parent
f482126
commit af6751e
Showing
4 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters