Page MenuHome GnuPG

pinentry doesn't compile
Closed, ResolvedPublic

Description

Compiling pinetry from HEAD doesn't work, because configure sets
-Wstrict-prototypes, but /usr/include/gtk-2.0/gtk/gtkitemfactory.h isn't clean:

make[2]: Entering directory '/home/us/neal/work/gpg/build/pinentry/gtk+-2'
gcc -DHAVE_CONFIG_H -I. -I../../../pinentry/gtk+-2 -I.. -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1
-I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/freetype2 -I../../../pinentry/secmem
-I../../../pinentry/pinentry -Wall -g -O2 -Wall -Wcast-align -Wshadow
-Wstrict-prototypes -Wno-pointer-sign -MT pinentry-gtk-2.o -MD -MP -MF
.deps/pinentry-gtk-2.Tpo -c -o pinentry-gtk-2.o
../../../pinentry/gtk+-2/pinentry-gtk-2.c
In file included from /usr/include/gtk-2.0/gtk/gtk.h:234:0,

from ../../../pinentry/gtk+-2/pinentry-gtk-2.c:28:

/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration
isn’t a prototype [-Wstrict-prototypes]
typedef void (*GtkItemFactoryCallback) ();
^

Details

Version
9d2d8b6bfaf2d5b07e7fb5be7188516e4158ed98

Event Timeline

neal set Version to 9d2d8b6bfaf2d5b07e7fb5be7188516e4158ed98.
neal added a subscriber: neal.
werner lowered the priority of this task from Normal to Low.
werner added a subscriber: werner.

Well, it is only a warning and we should not remove the -Wstrict-prototypes
because it is in general very helpful. I suggest to use something similar to

#if JNLIB_GCC_HAVE_PUSH_PRAGMA

  1. pragma GCC push_options
  2. pragma GCC optimize ("no-strict-overflow")

#endif
....
pragma pop... but with the diagnostics pragmas.

fixed by using

  1. pragma GCC diagnostic push
  2. pragma GCC diagnostic ignored "-Wstrict-prototypes"

...