Found by GCC 9:
toys/lsb/mount.c:188:22: warning: '%s' directive argument is null
[-Wformat-overflow=]
---
toys/lsb/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From 32d9b62f0946179918530ac4eadcebadce94e84d Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sat, 1 Feb 2020 21:47:51 -0800
Subject: [PATCH] mount.c: fix an error check.
Found by GCC 9:
toys/lsb/mount.c:188:22: warning: '%s' directive argument is null [-Wformat-overflow=]
---
toys/lsb/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c
index 5bf300db..6b1dfa46 100644
--- a/toys/lsb/mount.c
+++ b/toys/lsb/mount.c
@@ -185,7 +185,7 @@ static void mount_filesystem(char *dev, char *dir, char *type,
if (strstart(&dev, "UUID=")) {
char *s = tortoise(0, (char *[]){"blkid", "-U", dev, 0});
- if (!dev) return error_msg("No uuid %s", dev);
+ if (!s) return error_msg("No uuid %s", dev);
dev = s;
}
--
2.25.0.341.g760bfbb309-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net