qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Bin Meng <bmeng.cn@gmail.com>, Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Bin Meng <bin.meng@windriver.com>,
	Shengjiang Wu <shengjiang.wu@windriver.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/2] tests/qtest: migration-test: Fix [-Werror=format-overflow=] build warning
Date: Mon, 17 Oct 2022 16:14:18 +0200	[thread overview]
Message-ID: <581a5887-784d-6036-7a07-21e7b277d4fb@redhat.com> (raw)
In-Reply-To: <CAEUhbmWc2fwHKyW2ypMXVD51s3Uaf=AMb2_KK1NrMSQanHcfuA@mail.gmail.com>

On 17/10/2022 15.56, Bin Meng wrote:
> On Mon, Oct 17, 2022 at 8:28 PM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Bin Meng <bmeng.cn@gmail.com> writes:
>>
>>> 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);
>>
>> Thomas posted the same fix as "[PATCH] tests/qtest/migration-test: Do
>> not try to print NULL pointer string".  You guys figure out which one
>> you like better :)
>>
> 
> Oops, almost the same time :)
> 
> Will let Thomas decide.

The improvement of the error message in your v2 makes a lot of sense - I'll 
queue that version.

  Thomas




      reply	other threads:[~2022-10-17 14:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=581a5887-784d-6036-7a07-21e7b277d4fb@redhat.com \
    --to=thuth@redhat.com \
    --cc=armbru@redhat.com \
    --cc=bin.meng@windriver.com \
    --cc=bmeng.cn@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=shengjiang.wu@windriver.com \
    /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;
as well as URLs for NNTP newsgroup(s).