aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2006-12-04 12:45:19 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2006-12-04 12:45:19 +0000
commit2ad6a4bc54f7bf43c08224e8f2d41c1812cbbe37 (patch)
tree02390e60d20bf02d31bd4ef714691520d14fe2e7
parent237f8435f5619bf563424d2c55a14df6270a35d2 (diff)
build fixes
-rw-r--r--ChangeLog9
-rw-r--r--configure.in2
-rw-r--r--include/fuse.h6
-rw-r--r--include/fuse_compat.h2
-rw-r--r--lib/fuse_kern_chan.c1
-rw-r--r--lib/fuse_lowlevel.c10
-rw-r--r--lib/helper.c1
-rw-r--r--lib/mount.c1
-rw-r--r--util/fusermount.c2
9 files changed, 23 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ff4ec1..a28a5b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-12-04 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix warnings with gcc-4.1 on 64bit archs. Report from
+ Harshavardhana
+
+ * Add extra warning options, and fix resulting warnings
+
+ * Really fix fuse_teardown problem
+
2006-12-02 Miklos Szeredi <miklos@szeredi.hu>
* Add -lrt to fuse.pc (if needed) to fix static linking against
diff --git a/configure.in b/configure.in
index a5c8e4a..a4a465b 100644
--- a/configure.in
+++ b/configure.in
@@ -20,7 +20,7 @@ case $target_os in
esac
if test "$ac_env_CFLAGS_set" != set; then
- CFLAGS="-Wall -W -g -O2"
+ CFLAGS="-Wall -W -Wno-sign-compare -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings -g -O2 -fno-strict-aliasing"
fi
AC_ARG_ENABLE(kernel-module,
diff --git a/include/fuse.h b/include/fuse.h
index 3ac8c7e..90c4d5d 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -624,14 +624,14 @@ struct fuse_session *fuse_get_session(struct fuse *f);
fuse_main_real_compat25(argc, argv, op, sizeof(*(op)))
# define fuse_new fuse_new_compat25
# define fuse_setup fuse_setup_compat25
-# define fuse_teardown fuse_teardown_compat25
+# define fuse_teardown fuse_teardown_compat22
# define fuse_operations fuse_operations_compat25
# elif FUSE_USE_VERSION == 22
# define fuse_main(argc, argv, op) \
fuse_main_real_compat22(argc, argv, op, sizeof(*(op)))
# define fuse_new fuse_new_compat22
# define fuse_setup fuse_setup_compat22
-# define fuse_teardown fuse_teardown_compat25
+# define fuse_teardown fuse_teardown_compat22
# define fuse_operations fuse_operations_compat22
# define fuse_file_info fuse_file_info_compat
# elif FUSE_USE_VERSION == 24
@@ -646,7 +646,7 @@ struct fuse_session *fuse_get_session(struct fuse *f);
# define fuse_main fuse_main_compat2
# define fuse_new fuse_new_compat2
# define __fuse_setup fuse_setup_compat2
-# define __fuse_teardown fuse_teardown_compat25
+# define __fuse_teardown fuse_teardown_compat22
# define __fuse_exited fuse_exited
# define __fuse_set_getcontext_func fuse_set_getcontext_func
# else
diff --git a/include/fuse_compat.h b/include/fuse_compat.h
index c8393e4..b67f30e 100644
--- a/include/fuse_compat.h
+++ b/include/fuse_compat.h
@@ -62,7 +62,7 @@ struct fuse *fuse_setup_compat25(int argc, char *argv[],
size_t op_size, char **mountpoint,
int *multithreaded, int *fd);
-void fuse_teardown_compat25(struct fuse *fuse, int fd, char *mountpoint);
+void fuse_teardown_compat22(struct fuse *fuse, int fd, char *mountpoint);
#ifndef __FreeBSD__
#include <sys/statfs.h>
diff --git a/lib/fuse_kern_chan.c b/lib/fuse_kern_chan.c
index 45ff738..ed9d0c6 100644
--- a/lib/fuse_kern_chan.c
+++ b/lib/fuse_kern_chan.c
@@ -8,6 +8,7 @@
#include "fuse_lowlevel.h"
#include "fuse_kernel.h"
+#include "fuse_i.h"
#include <stdio.h>
#include <errno.h>
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 98738e4..682c503 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -11,6 +11,8 @@
#include "fuse_opt.h"
#include "fuse_i.h"
#include "fuse_misc.h"
+#include "fuse_common_compat.h"
+#include "fuse_lowlevel_compat.h"
#include <stdio.h>
#include <stdlib.h>
@@ -970,7 +972,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
}
if (bufsize < FUSE_MIN_READ_BUFFER) {
- fprintf(stderr, "fuse: warning: buffer size too small: %i\n", bufsize);
+ fprintf(stderr, "fuse: warning: buffer size too small: %zu\n",
+ bufsize);
bufsize = FUSE_MIN_READ_BUFFER;
}
@@ -1110,7 +1113,7 @@ static void fuse_ll_process(void *data, const char *buf, size_t len,
struct fuse_req *req;
if (f->debug) {
- printf("unique: %llu, opcode: %s (%i), nodeid: %lu, insize: %i\n",
+ printf("unique: %llu, opcode: %s (%i), nodeid: %lu, insize: %zu\n",
(unsigned long long) in->unique,
opname((enum fuse_opcode) in->opcode), in->opcode,
(unsigned long) in->nodeid, len);
@@ -1294,9 +1297,6 @@ struct fuse_session *fuse_lowlevel_new(struct fuse_args *args,
}
-#include "fuse_common_compat.h"
-#include "fuse_lowlevel_compat.h"
-
#ifndef __FreeBSD__
static void fill_open_compat(struct fuse_open_out *arg,
diff --git a/lib/helper.c b/lib/helper.c
index 63aefd5..a1e9eb0 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -331,6 +331,7 @@ int fuse_main_real(int argc, char *argv[], const struct fuse_operations *op,
}
#undef fuse_main
+int fuse_main(void);
int fuse_main(void)
{
fprintf(stderr, "fuse_main(): This function does not exist\n");
diff --git a/lib/mount.c b/lib/mount.c
index 2ed0381..a72294b 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -9,6 +9,7 @@
#include "config.h"
#include "fuse_i.h"
#include "fuse_opt.h"
+#include "fuse_common_compat.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/util/fusermount.c b/util/fusermount.c
index 9326037..2b84db5 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -141,7 +141,7 @@ static void unlock_mtab(int mtablock)
filenames. */
static int check_name(const char *name)
{
- char *s;
+ const char *s;
for (s = "\n\t\\"; *s; s++) {
if (strchr(name, *s)) {
fprintf(stderr, "%s: illegal character 0x%02x in mount entry\n",