summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--cifs_idmap_sss.c4
-rw-r--r--configure.ac6
3 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index e5c1987..ae28ee8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,6 @@ ACLOCAL_AMFLAGS = -I m4
lib_LTLIBRARIES = libcifs_idmap_sss.la
libcifs_idmap_sss_la_SOURCES = cifs_idmap_sss.c
-libcifs_idmap_sss_la_CFLAGS = $(SSS_IDMAP_CFLAGS)
+libcifs_idmap_sss_la_CFLAGS = $(GCC_CFLAGS) $(SSS_IDMAP_CFLAGS)
libcifs_idmap_sss_la_LIBADD = $(SSS_IDMAP_LIBS)
libcifs_idmap_sss_la_LDFLAGS = -avoid-version
diff --git a/cifs_idmap_sss.c b/cifs_idmap_sss.c
index 7955f0c..8831ab1 100644
--- a/cifs_idmap_sss.c
+++ b/cifs_idmap_sss.c
@@ -198,7 +198,7 @@ int cifs_idmap_sids_to_ids(void *handle, const struct cifs_sid *sid,
enum idmap_error_code idmap_err;
int err;
int success = -1;
- int i;
+ size_t i;
debug("num: %zd", num);
@@ -270,7 +270,7 @@ int cifs_idmap_ids_to_sids(void *handle, const struct cifs_uxid *cuxid,
enum idmap_error_code idmap_err;
int err;
int success = -1;
- int i;
+ size_t i;
debug("num ids: %zd", num);
diff --git a/configure.ac b/configure.ac
index b4686d0..a55bf80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,14 @@ AM_SILENT_RULES([yes])
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
+PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES([SSS_IDMAP], [sss_idmap sss_nss_idmap])
+if test "x$GCC" = "xyes"; then
+ GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes"
+fi
+AC_SUBST(GCC_CFLAGS)
+
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99