From: Ani Sinha <anisinha@redhat.com>
To: zhujun2 <zhujun2@cmss.chinamobile.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, imammedo@redhat.com,
thuth@redhat.com, lvivier@redhat.com
Subject: Re: [PATCH] tests: Fix printf format string in acpi-utils.c
Date: Fri, 27 Oct 2023 12:21:17 +0530 [thread overview]
Message-ID: <C05C01CC-D86C-4900-A173-C38EDE3FFFF4@redhat.com> (raw)
In-Reply-To: <20231027030930.7739-1-zhujun2@cmss.chinamobile.com>
> On 27-Oct-2023, at 8:39 AM, zhujun2 <zhujun2@cmss.chinamobile.com> wrote:
>
> Inside of acpi_fetch_table() arguments are
> printed via fprintf but '%d' is used to print @flags (of type
> uint). Use '%u' instead.
>
> Signed-off-by: zhujun2 <zhujun2@cmss.chinamobile.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
> ---
> tests/qtest/acpi-utils.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/acpi-utils.c b/tests/qtest/acpi-utils.c
> index 673fc97586..6389f1f418 100644
> --- a/tests/qtest/acpi-utils.c
> +++ b/tests/qtest/acpi-utils.c
> @@ -102,7 +102,7 @@ void acpi_fetch_table(QTestState *qts, uint8_t **aml, uint32_t *aml_len,
> char *fname = NULL;
> GError *error = NULL;
>
> - fprintf(stderr, "Invalid '%.4s'(%d)\n", *aml, *aml_len);
> + fprintf(stderr, "Invalid '%.4s'(%u)\n", *aml, *aml_len);
> fd = g_file_open_tmp("malformed-XXXXXX.dat", &fname, &error);
> g_assert_no_error(error);
> fprintf(stderr, "Dumping invalid table into '%s'\n", fname);
> --
> 2.17.1
>
>
>
next prev parent reply other threads:[~2023-10-27 6:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
2023-10-27 6:51 ` Ani Sinha [this message]
2023-10-27 8:20 ` Thomas Huth
2023-10-27 13:32 ` Markus Armbruster
2023-11-06 17:40 ` Michael S. Tsirkin
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=C05C01CC-D86C-4900-A173-C38EDE3FFFF4@redhat.com \
--to=anisinha@redhat.com \
--cc=imammedo@redhat.com \
--cc=lvivier@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=zhujun2@cmss.chinamobile.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).