Re: [Gimp-developer] Compilation error with GIMP git version

Thanks, fixed in master:

commit 34485cff869655fada8914245e124990d0d6d87b
Author: Michael Natterer <mitch gimp org>
Date:   Thu Jun 29 18:39:41 2017 +0200

    plug-ins: don't say for(int x...) in file-pcx.c

 plug-ins/common/file-pcx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

On Tue, 2017-06-27 at 16:35 +0200, Carmelo DrRaw wrote:
Dear developers,

I am getting the following compilation error with the current git
version of GIMP, using gcc 4.8.5:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -pthread -I/zzz/include/gtk-
2.0 -I/zzz/lib/gtk-2.0/include -I/zzz/include/atk-1.0
-I/zzz/include/cairo -I/zzz/include/gdk-pixbuf-2.0
-I/zzz/include/pango-1.0 -I/zzz/include/glib-2.0 -I/zzz/lib/glib-
2.0/include -I/zzz/include/pixman-1 -I/zzz/include/freetype2
-I/zzz/include/libpng16 -I/zzz/include/harfbuzz   -pthread
-I/zzz/include/gegl-0.3 -I/zzz/include/json-glib-1.0
-I/zzz/include/gio-unix-2.0/ -I/zzz/include/babl-0.1
-I/zzz/include/glib-2.0 -I/zzz/lib/glib-2.0/include   -I/zzz/include
-Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-
prototypes  -Wmissing-declarations -Winit-self -Wpointer-arith  -
Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-
limits -fno-common -fdiagnostics-show-option -Wreturn-type   -MT
file-pcx.o -MD -MP -MF .deps/file-pcx.Tpo -c -o file-pcx.o file-pcx.c
file-pcx.c: In function ‘save_less_than_8’:
file-pcx.c:943:3: error: ‘for’ loop initial declarations are only
allowed in C99 mode
   for (gint x = 0; x < buf_size; x++)
file-pcx.c:943:3: note: use option -std=c99 or -std=gnu99 to compile
your code
make[3]: *** [file-pcx.o] Error 1

The solution is simple, and consists of moving the declaration of

    gint x

in file-pcx.c outside of the for loop, for example immediately after 

    guchar  *line;

Hope this helps!
gimp-developer-list mailing list
List address:    gimp-developer-list gnome org
List membership:
List archives:

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