qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning
@ 2022-10-17 11:46 Bin Meng
  2022-10-17 11:46 ` [PATCH 2/2] tests/qtest: vhost-user-test: " Bin Meng
  2022-10-17 12:28 ` [PATCH 1/2] tests/qtest: migration-test: " Markus Armbruster
  0 siblings, 2 replies; 8+ messages in thread
From: Bin Meng @ 2022-10-17 11:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bin Meng, Shengjiang Wu, Dr. David Alan Gilbert, Juan Quintela,
	Laurent Vivier, Paolo Bonzini, Thomas Huth

From: Bin Meng <bin.meng@windriver.com>

When tmpfs is NULL, a build warning is seen with GCC 9.3.0.
It's strange that GCC 11.2.0 on Ubuntu 22.04 does not catch this,
neither did the QEMU CI.

Reported-by: Shengjiang Wu <shengjiang.wu@windriver.com>
Fixes: e5553c1b8d28 ("tests/qtest: migration-test: Avoid using hardcoded /tmp")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

 tests/qtest/migration-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index ef4427ff4d..83a8998e40 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2481,7 +2481,7 @@ int main(int argc, char **argv)
 
     tmpfs = g_dir_make_tmp("migration-test-XXXXXX", &err);
     if (!tmpfs) {
-        g_test_message("g_dir_make_tmp on path (%s): %s", tmpfs,
+        g_test_message("g_dir_make_tmp on path (%s): %s", g_get_tmp_dir(),
                        err->message);
     }
     g_assert(tmpfs);
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-17 14:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 11:46 [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning Bin Meng
2022-10-17 11:46 ` [PATCH 2/2] tests/qtest: vhost-user-test: " Bin Meng
2022-10-17 12:33   ` Markus Armbruster
2022-10-17 13:57     ` Bin Meng
2022-10-17 12:28 ` [PATCH 1/2] tests/qtest: migration-test: " Markus Armbruster
2022-10-17 12:30   ` Markus Armbruster
2022-10-17 13:56   ` Bin Meng
2022-10-17 14:14     ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).