[gimp] app, meson.build: fix a bunch of warnings in C++ files



commit 4fc345183bff212ee9f7ab9abbad81d730403122
Author: Ell <ell_se yahoo com>
Date:   Thu Sep 12 19:51:04 2019 +0300

    app, meson.build: fix a bunch of warnings in C++ files

 app/core/gimp-parallel.cc                  | 4 ++--
 app/core/gimppickable-contiguous-region.cc | 1 -
 app/gegl/gimp-gegl-loops.cc                | 2 ++
 app/paint/gimpbrushcore-loops.cc           | 4 +---
 meson.build                                | 4 ++--
 5 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimp-parallel.cc b/app/core/gimp-parallel.cc
index 46002c9334..1a31a5552e 100644
--- a/app/core/gimp-parallel.cc
+++ b/app/core/gimp-parallel.cc
@@ -227,8 +227,8 @@ gimp_parallel_run_async_independent_full (gint                     priority,
 #elif defined (HAVE_UNISTD_H) && defined (__gnu_linux__)
       if (task->priority)
         {
-          nice (task->priority) != -1;
-                             /* ^-- avoid "unused result" warning */
+          (nice (task->priority) != -1);
+                              /* ^-- avoid "unused result" warning */
         }
 #endif
 
diff --git a/app/core/gimppickable-contiguous-region.cc b/app/core/gimppickable-contiguous-region.cc
index d359571f0d..3b4fd66a79 100644
--- a/app/core/gimppickable-contiguous-region.cc
+++ b/app/core/gimppickable-contiguous-region.cc
@@ -1006,7 +1006,6 @@ find_contiguous_region (GeglBuffer          *src_buffer,
   const Babl          *mask_format = babl_format ("Y float");
   GeglSampler         *src_sampler;
   const GeglRectangle *src_extent;
-  gint                 x1, x2;
   gint                 old_y;
   gint                 start, end;
   gint                 new_start, new_end;
diff --git a/app/gegl/gimp-gegl-loops.cc b/app/gegl/gimp-gegl-loops.cc
index 76e377710c..209edd2755 100644
--- a/app/gegl/gimp-gegl-loops.cc
+++ b/app/gegl/gimp-gegl-loops.cc
@@ -632,8 +632,10 @@ gimp_gegl_smudge_with_paint (GeglBuffer          *accum_buffer,
   GeglAccessMode paint_buffer_access_mode = (brush_color ?
                                              GEGL_ACCESS_WRITE :
                                              GEGL_ACCESS_READWRITE);
+#if COMPILE_SSE2_INTRINISICS
   gboolean       sse2 = (gimp_cpu_accel_get_support () &
                          GIMP_CPU_ACCEL_X86_SSE2);
+#endif
 
   if (! accum_rect)
     accum_rect = gegl_buffer_get_extent (accum_buffer);
diff --git a/app/paint/gimpbrushcore-loops.cc b/app/paint/gimpbrushcore-loops.cc
index d517377f75..31b4afb52d 100644
--- a/app/paint/gimpbrushcore-loops.cc
+++ b/app/paint/gimpbrushcore-loops.cc
@@ -435,7 +435,7 @@ public:
   {
     gint i;
 
-    for (i = 0; i < G_N_ELEMENTS (map); i++)
+    for (i = 0; i < (gint) G_N_ELEMENTS (map); i++)
       map[i] = pressure (T (i));
   }
 
@@ -485,7 +485,6 @@ gimp_brush_core_pressurize_mask (GimpBrushCore     *core,
 {
   const GimpTempBuf *subsample_mask;
   const Babl        *subsample_mask_format;
-  gint               i;
 
   /* Get the raw subsampled mask */
   subsample_mask = gimp_brush_core_subsample_mask (core,
@@ -542,7 +541,6 @@ gimp_brush_core_solidify_mask_impl (const GimpTempBuf *mask,
   gint mask_width  = gimp_temp_buf_get_width  (mask);
   gint mask_height = gimp_temp_buf_get_height (mask);
   gint dest_width  = gimp_temp_buf_get_width  (dest);
-  gint dest_height = gimp_temp_buf_get_height (dest);
 
   gegl_parallel_distribute_area (
     GEGL_RECTANGLE (0, 0, mask_width, mask_height),
diff --git a/meson.build b/meson.build
index 96edd6806b..509802a844 100644
--- a/meson.build
+++ b/meson.build
@@ -237,13 +237,13 @@ warning_cflags_common = [
 
   # You can uncomment this to debug with less warning outputs
   '-Wno-deprecated-declarations',
-
-  '-Werror=implicit-function-declaration',
 ]
 warning_cflags_c = [
   '-Wdeclaration-after-statement',
   '-Wold-style-definition',
   '-Wno-strict-prototypes',
+
+  '-Werror=implicit-function-declaration',
 ]
 warning_cflags_cpp = [
 ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]