From 943aad8ca57a6b5c49c4ea60f9e8c13bf9b20e6c Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 16 Nov 2012 17:17:21 +0100 Subject: journal, shared: fix warnings during compilation on 32 bits Some filesystem magics are too big to fit in 31 bits, and are wrapped to negative. f_type is an int on 32 bits, so it is signed, and we get a warning on comparison. --- src/journal/catalog.c | 2 +- src/journal/sd-journal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/journal') diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 22029da851..2812d5970b 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -384,7 +384,7 @@ int catalog_update(void) { goto finish; } - log_debug("%s: wrote %u items, with %zu bytes of strings, %zu total size.", + log_debug("%s: wrote %u items, with %zu bytes of strings, %ld total size.", CATALOG_DATABASE, n, sb->len, ftell(w)); free(p); diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index c86f1eaab1..41f0c4dfb4 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1205,7 +1205,7 @@ static void check_network(sd_journal *j, int fd) { return; j->on_network = - sfs.f_type == CIFS_MAGIC_NUMBER || + (long)sfs.f_type == (long)CIFS_MAGIC_NUMBER || sfs.f_type == CODA_SUPER_MAGIC || sfs.f_type == NCP_SUPER_MAGIC || sfs.f_type == NFS_SUPER_MAGIC || -- cgit v1.2.3-54-g00ecf