From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH] libblkid: fix compiler warnings
Date: Mon, 16 Mar 2015 23:55:47 +0000 [thread overview]
Message-ID: <1426550147-24964-1-git-send-email-kerolasa@iki.fi> (raw)
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 <kerolasa@iki.fi>
---
libblkid/src/superblocks/bcache.c | 2 +-
libblkid/src/superblocks/minix.c | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/libblkid/src/superblocks/bcache.c b/libblkid/src/superblocks/bcache.c
index 4fb16bd..ba9cf32 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 9ea49fe..d6d45bd 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;
}
--
2.3.3
next reply other threads:[~2015-03-16 23:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 23:55 Sami Kerola [this message]
2015-03-17 9:16 ` [PATCH] libblkid: fix compiler warnings Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426550147-24964-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox