mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
gparamspecs: Fix -Wsign-conversion warnings for large constants
Not sure why these constants were chosen the way they were, but that’s not a problem I’m going to investigate right now. This just makes the implicit cast explicit to shut the compiler warning up. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3405
This commit is contained in:
@@ -152,8 +152,8 @@ param_int_init (GParamSpec *pspec)
|
||||
{
|
||||
GParamSpecInt *ispec = G_PARAM_SPEC_INT (pspec);
|
||||
|
||||
ispec->minimum = 0x7fffffff;
|
||||
ispec->maximum = 0x80000000;
|
||||
ispec->minimum = (int) 0x7fffffff;
|
||||
ispec->maximum = (int) 0x80000000;
|
||||
ispec->default_value = 0;
|
||||
}
|
||||
|
||||
@@ -253,11 +253,11 @@ param_long_init (GParamSpec *pspec)
|
||||
GParamSpecLong *lspec = G_PARAM_SPEC_LONG (pspec);
|
||||
|
||||
#if SIZEOF_LONG == 4
|
||||
lspec->minimum = 0x7fffffff;
|
||||
lspec->maximum = 0x80000000;
|
||||
lspec->minimum = (glong) 0x7fffffff;
|
||||
lspec->maximum = (glong) 0x80000000;
|
||||
#else /* SIZEOF_LONG != 4 (8) */
|
||||
lspec->minimum = 0x7fffffffffffffff;
|
||||
lspec->maximum = 0x8000000000000000;
|
||||
lspec->minimum = (glong) 0x7fffffffffffffff;
|
||||
lspec->maximum = (glong) 0x8000000000000000;
|
||||
#endif
|
||||
lspec->default_value = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user