LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File davfs2-fix-formats.patch of Package davfs2 (Project filesystems)

diff -rU3 davfs2-1.4.7/src/dav_coda.c davfs2-1.4.7.mine/src/dav_coda.c
--- davfs2-1.4.7/src/dav_coda.c	2012-07-19 13:18:51.000000000 +0200
+++ davfs2-1.4.7.mine/src/dav_coda.c	2013-02-13 12:36:46.000000000 +0100
@@ -21,6 +21,12 @@
 #include "config.h"
 
 #include <errno.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#define PRIu64 "llu"
+#define PRIx64 "llx"
+#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -661,7 +667,7 @@
                in->attr.va_uid, in->attr.va_gid);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  at %li, mt %li",
                in->attr.va_atime.tv_sec, in->attr.va_mtime.tv_sec);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  ct %li, sz %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  ct %li, sz %" PRIu64,
                in->attr.va_ctime.tv_sec, in->attr.va_size);
     }
 
diff -rU3 davfs2-1.4.7/src/dav_fuse.c davfs2-1.4.7.mine/src/dav_fuse.c
--- davfs2-1.4.7/src/dav_fuse.c	2012-07-19 13:18:51.000000000 +0200
+++ davfs2-1.4.7.mine/src/dav_fuse.c	2013-02-13 12:36:34.000000000 +0100
@@ -21,6 +21,12 @@
 #include "config.h"
 
 #include <errno.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#define PRIu64 "llu"
+#define PRIx64 "llx"
+#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -259,7 +265,7 @@
         case FUSE_UNLINK:
             if (debug) {
                 syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_UNLINK:");
-                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%llx, %s",
+                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%" PRIx64 ", %s",
                        ih->nodeid,
                        (char *) (buf + sizeof(struct fuse_in_header)));
             }
@@ -273,7 +279,7 @@
         case FUSE_RMDIR:
             if (debug) {
                 syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_RMDIR:");
-                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%llx, %s",
+                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%" PRIx64 ", %s",
                        ih->nodeid,
                        (char *) (buf + sizeof(struct fuse_in_header)));
             }
@@ -312,7 +318,7 @@
         case FUSE_FSYNC:
             if (debug) {
                 syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_FSYNC:");
-                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx",
+                syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64,
                 ih->nodeid);
             }
             oh->error = dav_sync((dav_node *) ((size_t) ih->nodeid));
@@ -421,7 +427,7 @@
     struct fuse_out_header *oh = (struct fuse_out_header *) buf;
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_ACCESS:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, f 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", f 0%o",
                ih->nodeid, in->mask);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  uid %i", ih->uid);
     }
@@ -449,7 +455,7 @@
                              (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_CREATE:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, f 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", f 0%o",
                ih->nodeid, in->flags);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i, mode 0%o",
                ih->pid, in->mode);
@@ -523,7 +529,7 @@
                                 (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_GETATTR:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx", ih->nodeid);
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64, ih->nodeid);
     }
 
     oh->error = dav_getattr((dav_node *) ((size_t) ih->nodeid), ih->uid);
@@ -556,7 +562,7 @@
     char *value = (char *) (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_GETXATTR:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, %s, %i",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", %s, %i",
                ih->nodeid, name, in->size);
     }
 
@@ -636,7 +642,7 @@
     char *value = (char *) (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_LISTXATTR:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, %i",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", %i",
                ih->nodeid, in->size);
     }
 
@@ -676,7 +682,7 @@
                                  (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_LOOKUP:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%llx, %s",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%" PRIx64 ", %s",
                ih->nodeid, name);
     }
 
@@ -716,7 +722,7 @@
                                  (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_MKDIR:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%llx, %s",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%" PRIx64 ", %s",
                ih->nodeid, name);
     }
 
@@ -756,7 +762,7 @@
                                  (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_MKNOD:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%llx, m 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  p 0x%" PRIx64 ", m 0%o",
                ih->nodeid, in->mode);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  %s", name);
     }
@@ -804,7 +810,7 @@
         } else {
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_OPEN:");
         }
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, f 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", f 0%o",
                ih->nodeid, in->flags);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i, mode 0%o",
                ih->pid, in->mode);
@@ -844,10 +850,10 @@
         } else {
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_READ:");
         }
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, fd %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", fd %" PRIu64,
                ih->nodeid, in->fh);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i", ih->pid);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  size %u, off %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  size %u, off %" PRIu64,
                in->size, in->offset);
     }
 
@@ -881,9 +887,9 @@
         } else {
             syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_RELEASE:");
         }
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, f 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", f 0%o",
                ih->nodeid, in->flags);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i, fd %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i, fd %" PRIu64,
                ih->pid, in->fh);
     }
 
@@ -909,9 +915,9 @@
     struct fuse_out_header *oh = (struct fuse_out_header *) buf;
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_RENAME:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  sp 0x%llx, %s",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  sp 0x%" PRIx64 ", %s",
                ih->nodeid, old);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  dp 0x%llx, %s",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  dp 0x%" PRIx64 ", %s",
                in->newdir, new);
     }
 
@@ -938,13 +944,13 @@
                                 (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_SETATTR:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, m 0%o",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", m 0%o",
                ih->nodeid, in->mode);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  uid %i, gid %i",
                in->uid, in->gid);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  sz %llu, at %llu,",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  sz %" PRIu64 ", at %" PRIu64 ",",
                in->size, in->atime);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  mt %llu", in->mtime);
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  mt %" PRIu64, in->mtime);
     }
 
     oh->error = dav_setattr((dav_node *) ((size_t) ih->nodeid), ih->uid,
@@ -1022,11 +1028,11 @@
                                  (buf + sizeof(struct fuse_out_header));
     if (debug) {
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "FUSE_WRITE:");
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%llx, fd %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  n 0x%" PRIx64 ", fd %" PRIu64,
                ih->nodeid, in->fh);
         syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  pid %i, flags 0%o",
                ih->pid, in->write_flags);
-        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  size %u, off %llu",
+        syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "  size %u, off %" PRIu64,
                in->size, in->offset);
     }
 
diff -rU3 davfs2-1.4.7/src/mount_davfs.c davfs2-1.4.7.mine/src/mount_davfs.c
--- davfs2-1.4.7/src/mount_davfs.c	2012-07-19 13:35:11.000000000 +0200
+++ davfs2-1.4.7.mine/src/mount_davfs.c	2013-02-13 12:33:27.000000000 +0100
@@ -1278,10 +1278,9 @@
 
     uid_t orig = geteuid();
     seteuid(0);
-    int ret;
     FILE *mtab = setmntent(_PATH_MOUNTED, "a");
     if (mtab) {
-        ret = addmntent(mtab, &mntent);
+        addmntent(mtab, &mntent);
         endmntent(mtab);
     } else {
         error(0, 0, _("Warning: can't write entry into mtab, but will mount "
@@ -1829,7 +1828,7 @@
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
            "  kernel_fs: %s", args->kernel_fs);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-           "  buf_size: %i KiB", args->buf_size);
+           "  buf_size: %zu KiB", args->buf_size);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
            "  uid: %i", args->uid);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
@@ -1903,9 +1902,9 @@
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
            "  backup_dir: %s", args->backup_dir);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-           "  cache_size: %i MiB", args->cache_size);
+           "  cache_size: %zu MiB", args->cache_size);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
-           "  table_size: %i", args->table_size);
+           "  table_size: %zu", args->table_size);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
            "  dir_refresh: %li s", args->dir_refresh);
     syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),