[gimp] libgimp: fix return values in g_return_val_if_fail() statements
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: fix return values in g_return_val_if_fail() statements
- Date: Thu, 24 Sep 2015 19:33:53 +0000 (UTC)
commit e7dc21d7952f6087c3903d21a724087a4a3bc910
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 24 21:32:33 2015 +0200
libgimp: fix return values in g_return_val_if_fail() statements
GLib master fixed the missing warnings since whatever GCC version.
libgimp/gimpdrawablepreview.c | 2 +-
libgimp/gimpimagecolorprofile.c | 4 ++--
libgimp/gimpzoompreview.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgimp/gimpdrawablepreview.c b/libgimp/gimpdrawablepreview.c
index 11859c5..a95f5d9 100644
--- a/libgimp/gimpdrawablepreview.c
+++ b/libgimp/gimpdrawablepreview.c
@@ -645,7 +645,7 @@ gimp_drawable_preview_new_from_drawable_id (gint32 drawable_ID)
gint32
gimp_drawable_preview_get_drawable_id (GimpDrawablePreview *preview)
{
- g_return_val_if_fail (GIMP_IS_DRAWABLE_PREVIEW (preview), NULL);
+ g_return_val_if_fail (GIMP_IS_DRAWABLE_PREVIEW (preview), -1);
return GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
}
diff --git a/libgimp/gimpimagecolorprofile.c b/libgimp/gimpimagecolorprofile.c
index 806d7a3..2b0b458 100644
--- a/libgimp/gimpimagecolorprofile.c
+++ b/libgimp/gimpimagecolorprofile.c
@@ -79,7 +79,7 @@ gimp_image_set_color_profile (gint32 image_ID,
gint length = 0;
g_return_val_if_fail (profile == NULL || GIMP_IS_COLOR_PROFILE (profile),
- NULL);
+ FALSE);
if (profile)
{
@@ -158,7 +158,7 @@ gimp_image_convert_color_profile (gint32 image_ID,
gint length = 0;
g_return_val_if_fail (profile == NULL || GIMP_IS_COLOR_PROFILE (profile),
- NULL);
+ FALSE);
if (profile)
{
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index 8c61bb1..8b68287 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -883,7 +883,7 @@ gimp_zoom_preview_new_with_model (GimpDrawable *drawable,
gint32
gimp_zoom_preview_get_drawable_id (GimpZoomPreview *preview)
{
- g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), NULL);
+ g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), -1);
return GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]