From: Damian Wrobel <[email protected]>

Fixes the following warning:

 pseudo_client.c: In function ‘pseudo_root_path’:
 pseudo_client.c:848:17: warning: ‘%s’ directive argument is null 
[-Wformat-overflow=]
   848 |                 pseudo_diag("couldn't allocate absolute path for 
'%s'.\n",
       |                 
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   849 |                         path);
       |                         ~~~~~

Signed-off-by: Damian Wrobel <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
---
 pseudo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pseudo_client.c b/pseudo_client.c
index 579db33..2583bca 100644
--- a/pseudo_client.c
+++ b/pseudo_client.c
@@ -846,7 +846,7 @@ pseudo_root_path(const char *func, int line, int dirfd, 
const char *path, int le
        pseudo_magic();
        if (!rc) {
                pseudo_diag("couldn't allocate absolute path for '%s'.\n",
-                       path);
+                       path ? path : "null");
        }
        pseudo_debug(PDBGF_CHROOT, "root_path [%s, %d]: '%s' from '%s'\n",
                func, line,
-- 
2.32.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155857): 
https://lists.openembedded.org/g/openembedded-core/message/155857
Mute This Topic: https://lists.openembedded.org/mt/85487316/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to