summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-11-23 11:07:16 +0100
committerLuke from DC <[email protected]>2022-02-09 04:29:07 +0000
commit0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e (patch)
tree3b38d896c428dad6fb1eb6a00c674d4fa517115f
parent4e386853640efa4f101fee6b446e5a5fb8858207 (diff)
downloadmate-control-center-0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e.tar.bz2
mate-control-center-0bfa4ca16e527fdc333fc1ded8b1d9f5963ccf1e.tar.xz
Remove build warning -Wbad-function-cast
-rw-r--r--capplets/appearance/appearance-style.c4
-rw-r--r--font-viewer/font-thumbnailer.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c
index c353f0e6..a0547941 100644
--- a/capplets/appearance/appearance-style.c
+++ b/capplets/appearance/appearance-style.c
@@ -472,9 +472,11 @@ cursor_size_scale_value_changed_cb (GtkRange *range, AppearanceData *data)
g_free (name);
if (theme) {
+ gdouble value;
gint size;
- size = g_array_index (theme->sizes, gint, (int) gtk_range_get_value (range));
+ value = gtk_range_get_value (range);
+ size = g_array_index (theme->sizes, gint, (int) value);
cursor_size_changed_cb (size, data);
}
}
diff --git a/font-viewer/font-thumbnailer.c b/font-viewer/font-thumbnailer.c
index 583fb490..81ff1456 100644
--- a/font-viewer/font-thumbnailer.c
+++ b/font-viewer/font-thumbnailer.c
@@ -152,7 +152,7 @@ build_fallback_thumbstr (FT_Face face)
total_chars = g_utf8_strlen (chars, -1);
while (idx < 2) {
- total_chars = (gint) floor (total_chars / 2.0);
+ total_chars = total_chars / 2;
ptr = g_utf8_offset_to_pointer (chars, total_chars);
end = g_utf8_find_next_char (ptr, NULL);