Minor, fix double-promotion warnings (#1221)
This commit is contained in:
parent
c2c7e6471c
commit
5de2d9cdbd
|
@ -91,7 +91,7 @@ jobs:
|
||||||
- run: apt update || true
|
- run: apt update || true
|
||||||
- run: apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
|
- run: apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libfontconfig1-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
|
||||||
- run: pip install fonttools
|
- run: pip install fonttools
|
||||||
- run: CFLAGS="-Weverything -Wno-reserved-id-macro -Wno-conversion -Wno-padded -Wno-sign-conversion -Wno-cast-qual -Wno-documentation -Wno-documentation-unknown-command" CXXFLAGS="-Weverything -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-c++98-compat -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-padded -Wno-shorten-64-to-32 -Wno-extra-semi -Wno-reserved-id-macro -Wno-float-conversion -Wno-format-pedantic -Wno-shadow -Wno-conversion -Wno-zero-as-null-pointer-constant -Wno-missing-field-initializers -Wno-double-promotion -Wno-used-but-marked-unused -Wno-unused-macros -Wno-comma -Wno-float-equal -Wno-disabled-macro-expansion -Wno-weak-vtables -Wno-unused-parameter -Wno-covered-switch-default -Wno-unreachable-code" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 --with-fontconfig
|
- run: CFLAGS="-Weverything -Wno-reserved-id-macro -Wno-conversion -Wno-padded -Wno-sign-conversion -Wno-cast-qual -Wno-documentation -Wno-documentation-unknown-command" CXXFLAGS="-Weverything -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-c++98-compat -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-padded -Wno-shorten-64-to-32 -Wno-extra-semi -Wno-reserved-id-macro -Wno-float-conversion -Wno-format-pedantic -Wno-shadow -Wno-conversion -Wno-zero-as-null-pointer-constant -Wno-missing-field-initializers -Wno-used-but-marked-unused -Wno-unused-macros -Wno-comma -Wno-float-equal -Wno-disabled-macro-expansion -Wno-weak-vtables -Wno-unused-parameter -Wno-covered-switch-default -Wno-unreachable-code" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 --with-fontconfig
|
||||||
- run: make -j32 CPPFLAGS="-Werror"
|
- run: make -j32 CPPFLAGS="-Werror"
|
||||||
- run: make check CPPFLAGS="-Werror" || .ci/fail.sh
|
- run: make check CPPFLAGS="-Werror" || .ci/fail.sh
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ static void colr_cpal_rendering (cairo_font_face_t *cairo_face, unsigned int upe
|
||||||
int r = (color >> 8) & 0xFF;
|
int r = (color >> 8) & 0xFF;
|
||||||
int g = (color >> 16) & 0xFF;
|
int g = (color >> 16) & 0xFF;
|
||||||
int b = (color >> 24) & 0xFF;
|
int b = (color >> 24) & 0xFF;
|
||||||
cairo_set_source_rgba (cr, r / 255.f, g / 255.f, b / 255.f, alpha);
|
cairo_set_source_rgba (cr, r / 255., g / 255., b / 255., alpha);
|
||||||
|
|
||||||
cairo_glyph_t glyph;
|
cairo_glyph_t glyph;
|
||||||
glyph.index = glyph_id;
|
glyph.index = glyph_id;
|
||||||
|
|
|
@ -1072,7 +1072,7 @@ hb_variation_to_string (hb_variation_t *variation,
|
||||||
while (len && s[len - 1] == ' ')
|
while (len && s[len - 1] == ' ')
|
||||||
len--;
|
len--;
|
||||||
s[len++] = '=';
|
s[len++] = '=';
|
||||||
len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", variation->value));
|
len += MAX (0, snprintf (s + len, ARRAY_LENGTH (s) - len, "%g", (double) variation->value));
|
||||||
|
|
||||||
assert (len < ARRAY_LENGTH (s));
|
assert (len < ARRAY_LENGTH (s));
|
||||||
len = MIN (len, size - 1);
|
len = MIN (len, size - 1);
|
||||||
|
|
|
@ -177,7 +177,7 @@ struct fvar
|
||||||
v = (v - axis.default_value) / (axis.default_value - axis.min_value);
|
v = (v - axis.default_value) / (axis.default_value - axis.min_value);
|
||||||
else
|
else
|
||||||
v = (v - axis.default_value) / (axis.max_value - axis.default_value);
|
v = (v - axis.default_value) / (axis.max_value - axis.default_value);
|
||||||
return (int) (v * 16384. + (v >= 0. ? .5 : -.5));
|
return (int) (v * 16384.f + (v >= 0.f ? .5f : -.5f));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue