[gegl] gegl, operations, tools: Fix signed/unsigned comparisons
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl, operations, tools: Fix signed/unsigned comparisons
- Date: Fri, 2 Aug 2019 21:38:34 +0000 (UTC)
commit d4e80db660f787156e5c8293b18dc82498f7ec97
Author: Félix Piédallu <felix piedallu me>
Date: Wed Jul 17 10:41:43 2019 +0200
gegl, operations, tools: Fix signed/unsigned comparisons
gegl/gegl-op.h | 2 +-
operations/workshop/voronoi-diagram.cc | 4 ++--
tools/exp_combine.cpp | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gegl/gegl-op.h b/gegl/gegl-op.h
index 2c33b1c1b..387e39e17 100644
--- a/gegl/gegl-op.h
+++ b/gegl/gegl-op.h
@@ -320,7 +320,7 @@ static GType enum_name ## _get_type (void) \
}; \
if (gegl_op_gettext_package) \
{ \
- gint i; \
+ guint i; \
for (i = 0; i < G_N_ELEMENTS (values); i++) \
if (values[i].value_name) \
values[i].value_name = \
diff --git a/operations/workshop/voronoi-diagram.cc b/operations/workshop/voronoi-diagram.cc
index a33ab1979..5362facb0 100644
--- a/operations/workshop/voronoi-diagram.cc
+++ b/operations/workshop/voronoi-diagram.cc
@@ -148,8 +148,8 @@ process (GeglOperation *operation,
const Babl *format = gegl_buffer_get_format (output);
const Babl *dist_format = babl_format ("Y u32");
const Babl *aux_format = aux ? gegl_buffer_get_format (aux) : format;
- gint bpp = babl_format_get_bytes_per_pixel (format);
- gint aux_bpp = babl_format_get_bytes_per_pixel (aux_format);
+ guint bpp = babl_format_get_bytes_per_pixel (format);
+ guint aux_bpp = babl_format_get_bytes_per_pixel (aux_format);
GeglBuffer *dist;
guint8 mask[64];
diff --git a/tools/exp_combine.cpp b/tools/exp_combine.cpp
index 6fd0df04c..e041295e8 100644
--- a/tools/exp_combine.cpp
+++ b/tools/exp_combine.cpp
@@ -108,6 +108,7 @@ main (int argc,
NULL);
for (cursor = ARG_PATH_0; cursor < argc; ++cursor)
+ for (cursor = ARG_PATH_0; cursor < unsigned(argc); ++cursor)
{
const gchar *input_path;
gchar ev_string[G_ASCII_DTOSTR_BUF_SIZE + 1];
@@ -143,7 +144,7 @@ main (int argc,
"%s%u",
COMBINER_INPUT_PREFIX,
cursor - ARG_PATH_0);
- if (err < 1 || err >= G_N_ELEMENTS (combiner_pad))
+ if (err < 1 || unsigned(err) >= G_N_ELEMENTS (combiner_pad))
{
g_warning ("Unable to construct input pad name for exposure %u\n",
cursor);
@@ -158,7 +159,7 @@ main (int argc,
/* We should not have skipped past the last element of the arguments */
- g_return_val_if_fail (cursor == argc, EXIT_FAILURE);
+ g_return_val_if_fail (cursor == unsigned(argc), EXIT_FAILURE);
sink = gegl_node_new_child (gegl,
"operation", "gegl:save",
"path", argv[ARG_OUTPUT],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]