build fixes
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 4 Dec 2006 12:45:19 +0000 (12:45 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 4 Dec 2006 12:45:19 +0000 (12:45 +0000)
ChangeLog
configure.in
include/fuse.h
include/fuse_compat.h
lib/fuse_kern_chan.c
lib/fuse_lowlevel.c
lib/helper.c
lib/mount.c
util/fusermount.c

index 6ff4ec161f0e49df18ccb7b5fbf4977e8a070f75..a28a5b0f054a475c62b76dc1d6d80d27455bd46c 100644 (file)
--- 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
index a5c8e4a1e8f0ba1d3f11a0d142885a149c3cb427..a4a465b489d3e573c2631b9dbf464cbf66096420 100644 (file)
@@ -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,
index 3ac8c7ef104e0c0c863e93ca7e64fa628742642e..90c4d5d2c3caff4e8ed5b2cf964002580550533c 100644 (file)
@@ -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
index c8393e4e40ccf21618185b578ed892f21c60e371..b67f30e00a173232e3b57b30d86ce12ef181970f 100644 (file)
@@ -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>
index 45ff738b845f671bc23164ce515628c943cf7cca..ed9d0c636c2ac5ccb74df0d3aa6b569e1a5cfda0 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "fuse_lowlevel.h"
 #include "fuse_kernel.h"
+#include "fuse_i.h"
 
 #include <stdio.h>
 #include <errno.h>
index 98738e4d77a6c993f8ff3db96f2314575d7c32d8..682c503c4edf63379f7ed288f1d11783dd9d9622 100644 (file)
@@ -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,
index 63aefd51b3f0012dbe7ad6fa2a8586d388a899eb..a1e9eb021eddf8bb2befe7e615a279f28d006d3e 100644 (file)
@@ -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");
index 2ed0381432cd90ca58efb492a2ab220fc23d899a..a72294bef461e4f308199e9e1ab367631fa777fe 100644 (file)
@@ -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>
index 9326037fdaa3839d55569f634df37944d537c5df..2b84db540c0a5f25926aa6b60513030bd9f377bb 100644 (file)
@@ -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",