aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Curtin <ericcurtin17@gmail.com>2020-01-28 17:15:14 +0000
committerEric Curtin <ericcurtin17@gmail.com>2020-01-28 17:15:14 +0000
commit79980baa2ec8db668a8724b5b115db548ea83cc8 (patch)
treeb8a6a2f81a96fff511d72b72f4ce25e64f956d3d
parent7855c9437b0c00c017b8d570af6733bf2d578e71 (diff)
downloadinotify-tools-79980baa2ec8db668a8724b5b115db548ea83cc8.zip
inotify-tools-79980baa2ec8db668a8724b5b115db548ea83cc8.tar.gz
inotify-tools-79980baa2ec8db668a8724b5b115db548ea83cc8.tar.bz2
Add Wall and Werror
-rw-r--r--libinotifytools/src/Makefile.am2
-rw-r--r--libinotifytools/src/inotifytools.c2
-rw-r--r--libinotifytools/src/redblack.c4
-rw-r--r--src/Makefile.am2
4 files changed, 4 insertions, 6 deletions
diff --git a/libinotifytools/src/Makefile.am b/libinotifytools/src/Makefile.am
index 227da49..b5c7ff2 100644
--- a/libinotifytools/src/Makefile.am
+++ b/libinotifytools/src/Makefile.am
@@ -14,7 +14,7 @@ EXTRA_DIST = example.c Doxyfile
nobase_include_HEADERS = inotifytools/inotifytools.h inotifytools/inotify-nosys.h inotifytools/inotify.h
-AM_CFLAGS = -std=c99
+AM_CFLAGS = -std=c99 -Wall -Werror
if DOXYGEN_ENABLE
diff --git a/libinotifytools/src/inotifytools.c b/libinotifytools/src/inotifytools.c
index f5e207f..8fd50f6 100644
--- a/libinotifytools/src/inotifytools.c
+++ b/libinotifytools/src/inotifytools.c
@@ -2071,7 +2071,7 @@ int event_compare(const void *p1, const void *p2, const void *config)
{
if (!p1 || !p2) return p1 - p2;
char asc = 1;
- int sort_event = (int)config;
+ int sort_event = *(int*)config;
if (sort_event == -1) {
sort_event = 0;
asc = 0;
diff --git a/libinotifytools/src/redblack.c b/libinotifytools/src/redblack.c
index f8620a0..677ae82 100644
--- a/libinotifytools/src/redblack.c
+++ b/libinotifytools/src/redblack.c
@@ -1,5 +1,3 @@
-static char rcsid[]="$Id: redblack.c,v 1.9 2003/10/24 01:31:21 damo Exp $";
-
/*
Redblack balanced tree algorithm
Copyright (C) Damian Ivereigh 2000
@@ -442,7 +440,7 @@ static struct RB_ENTRY(node) *
RB_ENTRY(_lookup)(int mode, const RB_ENTRY(data_t) *key, struct RB_ENTRY(tree) *rbinfo)
{
struct RB_ENTRY(node) *x,*y;
- int cmp;
+ int cmp=0;
int found=0;
y=RBNULL; /* points to the parent of x */
diff --git a/src/Makefile.am b/src/Makefile.am
index 8fa8f49..7de3c45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@ bin_PROGRAMS = inotifywait inotifywatch
inotifywait_SOURCES = inotifywait.c common.c common.h
inotifywatch_SOURCES = inotifywatch.c common.c common.h
-AM_CFLAGS = -Wall -Werror -Wpointer-arith -std=c99 -I../libinotifytools/src
+AM_CFLAGS = -Wall -Wextra -Wpointer-arith -Werror -std=c99 -I../libinotifytools/src
AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src
LDADD = ../libinotifytools/src/libinotifytools.la