path: root/jffsX-utils/mkfs.jffs2.c
diff options
authorDaniel Walter <dwalter@sigma-star.at>2015-11-03 14:50:02 +0100
committerRichard Weinberger <richard@nod.at>2015-11-12 13:36:39 +0100
commit701580c29c3526ce1ccaeae335733dd2fa5bce8c (patch)
tree714b0ad2c0d168145fadab84bfce262b67415018 /jffsX-utils/mkfs.jffs2.c
parent1d04b4d5361af60c3b46a406fefaa2b5625b1793 (diff)
Fix scanf() formatstring for modern C version
mkfs.jffs2 is using an old assignment-allocation modifier for scanf(). Add a check so this modifier does not get confused with a float formatstring on newer C standard (C99 onwards). Signed-off-by: Daniel Walter <dwalter@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'jffsX-utils/mkfs.jffs2.c')
1 files changed, 4 insertions, 0 deletions
diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c
index f09c0b2..b83c1ee 100644
--- a/jffsX-utils/mkfs.jffs2.c
+++ b/jffsX-utils/mkfs.jffs2.c
@@ -376,7 +376,11 @@ static struct filesystem_entry *recursive_add_host_directory(
#ifdef __GNUC__
+#if __STDC_VERSION__ >= 199901L
+#define SCANF_PREFIX "m"
#define SCANF_PREFIX "a"
#define SCANF_STRING(s) (&s)
#define GETCWD_SIZE 0