summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-24 14:20:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-24 14:20:07 (GMT)
commitd599cc7ae22122421ef51f99d76519c94b2b7dad (patch)
tree740c732fe82c1507f811f7a208eae80cda59b7c6 /unix
parent2e843d0b0acfc798805207af3c8ace7dcd03abf2 (diff)
parente89bfca44403750e0e1b9f7f36ed67cd244ab73f (diff)
downloadtk-d599cc7ae22122421ef51f99d76519c94b2b7dad.zip
tk-d599cc7ae22122421ef51f99d76519c94b2b7dad.tar.gz
tk-d599cc7ae22122421ef51f99d76519c94b2b7dad.tar.bz2
Add -Wpointer-arith to C-flags. Fix some ANSI prototypes.
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure2
-rw-r--r--unix/tcl.m42
-rw-r--r--unix/tkUnixEvent.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/unix/configure b/unix/configure
index 070ae82..7454f92 100755
--- a/unix/configure
+++ b/unix/configure
@@ -4392,7 +4392,7 @@ fi
if test "$GCC" = yes; then
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wpointer-arith"
else
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0e02cd6..585bbba 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1080,7 +1080,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_DEBUG=-g
AS_IF([test "$GCC" = yes], [
CFLAGS_OPTIMIZE=-O2
- CFLAGS_WARNING="-Wall"
+ CFLAGS_WARNING="-Wall -Wpointer-arith"
], [
CFLAGS_OPTIMIZE=-O
CFLAGS_WARNING=""
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index bd55195..4d0b9be 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -508,9 +508,9 @@ DisplayFileProc(
* nice (?!) message.
*/
- void (*oldHandler)();
+ void (*oldHandler)(int);
- oldHandler = (void (*)()) signal(SIGPIPE, SIG_IGN);
+ oldHandler = (void (*)(int)) signal(SIGPIPE, SIG_IGN);
XNoOp(display);
XFlush(display);
(void) signal(SIGPIPE, oldHandler);