Fix integer format warnings
This commit is contained in:
parent
46e6f3f1c9
commit
418b5258c2
@ -1,6 +1,9 @@
|
|||||||
ChangeLog for davfs2
|
ChangeLog for davfs2
|
||||||
--------------------
|
--------------------
|
||||||
--------------------
|
|
||||||
|
2012-08-03 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
|
* cache.c, kernel_interface.c:
|
||||||
|
Fix integer format warnings.
|
||||||
|
|
||||||
2012-06-03 Werner Baumann (werner.baumann@onlinehome.de)
|
2012-06-03 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
* cache.c, has_permission:
|
* cache.c, has_permission:
|
||||||
|
@ -33,7 +33,8 @@ mount_davfs_SOURCES = cache.c dav_coda.c \
|
|||||||
umount_davfs_SOURCES = umount_davfs.c defaults.h
|
umount_davfs_SOURCES = umount_davfs.c defaults.h
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl
|
AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl
|
||||||
AM_CFLAGS = -Wall
|
AM_CFLAGS = -Wall -Werror=format-security \
|
||||||
|
-fstack-protector --param=ssp-buffer-size=4
|
||||||
DEFS = -DPROGRAM_NAME=\"mount.davfs\" \
|
DEFS = -DPROGRAM_NAME=\"mount.davfs\" \
|
||||||
-DDAV_SYS_CONF_DIR=\"$(pkgsysconfdir)\" \
|
-DDAV_SYS_CONF_DIR=\"$(pkgsysconfdir)\" \
|
||||||
-DDAV_SYS_RUN=\"$(pkglocalstatedir)\" \
|
-DDAV_SYS_RUN=\"$(pkglocalstatedir)\" \
|
||||||
@ -45,7 +46,8 @@ DEFS = -DPROGRAM_NAME=\"mount.davfs\" \
|
|||||||
-DDAV_DATA_DIR=\"$(pkgdatadir)\" \
|
-DDAV_DATA_DIR=\"$(pkgdatadir)\" \
|
||||||
-DLOCALEDIR=\"$(localedir)\" \
|
-DLOCALEDIR=\"$(localedir)\" \
|
||||||
-DDAV_USER=\"$(dav_user)\" \
|
-DDAV_USER=\"$(dav_user)\" \
|
||||||
-DDAV_GROUP=\"$(dav_group)\" @DEFS@
|
-DDAV_GROUP=\"$(dav_group)\" \
|
||||||
|
-D_FORTIFY_SOURCE=2 @DEFS@
|
||||||
LIBS = $(NEON_LIBS) @LIBS@
|
LIBS = $(NEON_LIBS) @LIBS@
|
||||||
mount_davfs_LDADD = $(LIBINTL) $(LIBICONV) ../gl/libgnu.a
|
mount_davfs_LDADD = $(LIBINTL) $(LIBICONV) ../gl/libgnu.a
|
||||||
umount_davfs_LDADD = $(LIBINTL) ../gl/libgnu.a
|
umount_davfs_LDADD = $(LIBINTL) ../gl/libgnu.a
|
||||||
|
22
src/cache.c
22
src/cache.c
@ -592,7 +592,7 @@ dav_init_cache(const dav_args *args, const char *mpoint)
|
|||||||
alignment = test_alignment();
|
alignment = test_alignment();
|
||||||
if (debug)
|
if (debug)
|
||||||
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Alignment of dav_node: %i",
|
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "Alignment of dav_node: %i",
|
||||||
alignment);
|
(int) alignment);
|
||||||
|
|
||||||
default_uid = args->fsuid;
|
default_uid = args->fsuid;
|
||||||
default_gid = args->fsgid;
|
default_gid = args->fsgid;
|
||||||
@ -746,9 +746,10 @@ dav_tidy_cache(void)
|
|||||||
{
|
{
|
||||||
if (debug) {
|
if (debug) {
|
||||||
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
|
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG),
|
||||||
"tidy: %i of %llu nodes changed", nchanged, fs_stat->files);
|
"tidy: %i of %lli nodes changed", nchanged,
|
||||||
|
(long long int) fs_stat->files);
|
||||||
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "cache-size: %llu MiBytes.",
|
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "cache-size: %llu MiBytes.",
|
||||||
(cache_size + 0x80000) / 0x100000);
|
(unsigned long long int) (cache_size + 0x80000) / 0x100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cache_size > max_cache_size)
|
if (cache_size > max_cache_size)
|
||||||
@ -1216,7 +1217,8 @@ dav_read(ssize_t *len, dav_node * node, int fd, char *buf, size_t size,
|
|||||||
|
|
||||||
*len = pread(fd, buf, size, offset);
|
*len = pread(fd, buf, size, offset);
|
||||||
if (debug)
|
if (debug)
|
||||||
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read %i", *len);
|
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "read %lli",
|
||||||
|
(long long int) *len);
|
||||||
if (*len < 0)
|
if (*len < 0)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
@ -1609,7 +1611,8 @@ dav_write(size_t *written, dav_node * node, int fd, char *buf, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), " written %i", *written);
|
syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), " written %llui",
|
||||||
|
(unsinged long long int) *written);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3059,13 +3062,8 @@ write_node(dav_node *node, FILE *file, const char *indent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_reg(node)) {
|
if (is_reg(node)) {
|
||||||
#if _FILE_OFFSET_BITS == 64
|
if (fprintf(file, "%s<d:%s>%lli</d:%s>\n", ind, type[SIZE],
|
||||||
if (fprintf(file, "%s<d:%s>%lli</d:%s>\n", ind, type[SIZE], node->size,
|
(long long int) node->size, type[SIZE]) < 0)
|
||||||
type[SIZE]) < 0)
|
|
||||||
#else
|
|
||||||
if (fprintf(file, "%s<d:%s>%li</d:%s>\n", ind, type[SIZE], node->size,
|
|
||||||
type[SIZE]) < 0)
|
|
||||||
#endif
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,11 +243,11 @@ init_fuse(int *dev, dav_run_msgloop_fn *msg_loop, void **mdata,
|
|||||||
#if SIZEOF_VOID_P == 8
|
#if SIZEOF_VOID_P == 8
|
||||||
*mdata = xasprintf("fd=%i,rootmode=%o,user_id=%i,group_id=%i,"
|
*mdata = xasprintf("fd=%i,rootmode=%o,user_id=%i,group_id=%i,"
|
||||||
"allow_other,max_read=%lu", *dev, mode, owner, group,
|
"allow_other,max_read=%lu", *dev, mode, owner, group,
|
||||||
*buf_size - 4096);
|
(unsigned long int) (*buf_size - 4096));
|
||||||
#else
|
#else
|
||||||
*mdata = xasprintf("fd=%i,rootmode=%o,user_id=%i,group_id=%i,"
|
*mdata = xasprintf("fd=%i,rootmode=%o,user_id=%i,group_id=%i,"
|
||||||
"allow_other,max_read=%u", *dev, mode, owner, group,
|
"allow_other,max_read=%u", *dev, mode, owner, group,
|
||||||
*buf_size - 4096);
|
(unsigned int) (*buf_size - 4096));
|
||||||
#endif
|
#endif
|
||||||
if (mount(url, mpoint, "fuse", mopts, *mdata) == 0) {
|
if (mount(url, mpoint, "fuse", mopts, *mdata) == 0) {
|
||||||
*msg_loop = dav_fuse_loop;
|
*msg_loop = dav_fuse_loop;
|
||||||
|
Loading…
Reference in New Issue
Block a user