diff --git a/app/operations/gimpcageconfig.c b/app/operations/gimpcageconfig.c index 774489c9e6..29677f89c0 100644 --- a/app/operations/gimpcageconfig.c +++ b/app/operations/gimpcageconfig.c @@ -425,7 +425,6 @@ gimp_cage_config_get_bounding_box (GimpCageConfig *gcc) GimpCagePoint *point; g_return_val_if_fail (GIMP_IS_CAGE_CONFIG (gcc), bounding_box); - g_return_val_if_fail (gcc->cage_points->len >= 0, bounding_box); if (gcc->cage_points->len == 0) return bounding_box; diff --git a/libgimpbase/gimpwire.c b/libgimpbase/gimpwire.c index 87945095af..71fbb77d5d 100644 --- a/libgimpbase/gimpwire.c +++ b/libgimpbase/gimpwire.c @@ -96,8 +96,6 @@ gimp_wire_read (GIOChannel *channel, gsize count, gpointer user_data) { - g_return_val_if_fail (count >= 0, FALSE); - if (wire_read_func) { if (!(* wire_read_func) (channel, buf, count, user_data)) @@ -167,8 +165,6 @@ gimp_wire_write (GIOChannel *channel, gsize count, gpointer user_data) { - g_return_val_if_fail (count >= 0, FALSE); - if (wire_write_func) { if (!(* wire_write_func) (channel, (guint8 *) buf, count, user_data)) diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c index c5f25139cc..caf5812e21 100644 --- a/plug-ins/common/file-xmc.c +++ b/plug-ins/common/file-xmc.c @@ -871,7 +871,7 @@ load_thumbnail (const gchar *filename, size = READ32 (fp, error) positions[*thumb_num_layers] = READ32 (fp, error) /* is this image is more preferred than selected before? */ - diff = ABS(thumb_size - size); + diff = MAX (thumb_size, size) - MIN (thumb_size, size); if (diff < min_diff) {/* the image size is closer than current selected image */ min_diff = diff; diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c index 989fdd2f23..fc47880aa5 100644 --- a/plug-ins/script-fu/tinyscheme/scheme.c +++ b/plug-ins/script-fu/tinyscheme/scheme.c @@ -1651,7 +1651,8 @@ static gunichar basic_inchar(port *pt) { len = pt->rep.string.past_the_end - pt->rep.string.curr; c = g_utf8_get_char_validated(pt->rep.string.curr, len); - if (c >= 0) /* Valid UTF-8 character? */ + if (c != (gunichar) -1 && + c != (gunichar) -2) /* Valid UTF-8 character? */ { len = g_unichar_to_utf8(c, NULL); /* Length of UTF-8 sequence */ pt->rep.string.curr += len;