From: Sami Kerola Date: Mon, 16 Mar 2015 00:03:49 +0000 (+0000) Subject: libblkid: fix compiler warnings X-Git-Tag: v2.27-rc1~350^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf9228608497cf305a340de7426e81b716b3f96f;p=thirdparty%2Futil-linux.git libblkid: fix compiler warnings warning: extra ';' outside of a function [-Wextra-semi] warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] Signed-off-by: Sami Kerola --- diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c index 4fb16bde2b..ba9cf32706 100644 --- a/libblkid/src/superblocks/bcache.c +++ b/libblkid/src/superblocks/bcache.c @@ -117,7 +117,7 @@ static int probe_bcache (blkid_probe pr, const struct blkid_idmag *mag) return BLKID_PROBE_NONE; return BLKID_PROBE_OK; -}; +} const struct blkid_idinfo bcache_idinfo = { diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c index 9ea49fee87..d6d45bd9b7 100644 --- a/libblkid/src/superblocks/minix.c +++ b/libblkid/src/superblocks/minix.c @@ -21,6 +21,7 @@ static int get_minix_version(const unsigned char *data, int *other_endian) struct minix_super_block *sb = (struct minix_super_block *) data; struct minix3_super_block *sb3 = (struct minix3_super_block *) data; int version = 0; + char *endian; *other_endian = 0; @@ -60,13 +61,13 @@ static int get_minix_version(const unsigned char *data, int *other_endian) if (!version) return -1; - DBG(LOWPROBE, ul_debug("minix version %d detected [%s]", version, #if defined(WORDS_BIGENDIAN) - *other_endian ? "LE" : "BE" + endian = *other_endian ? "LE" : "BE"; #else - *other_endian ? "BE" : "LE" + endian = *other_endian ? "BE" : "LE"; #endif - )); + DBG(LOWPROBE, ul_debug("minix version %d detected [%s]", version, + endian)); return version; }