* [PATCH] tests: Fix printf format string in acpi-utils.c
@ 2023-10-27 3:09 zhujun2
2023-10-27 6:51 ` Ani Sinha
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zhujun2 @ 2023-10-27 3:09 UTC (permalink / raw)
To: qemu-devel; +Cc: mst, imammedo, anisinha, thuth, lvivier, zhujun2
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>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: Fix printf format string in acpi-utils.c
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
@ 2023-10-27 6:51 ` Ani Sinha
2023-10-27 8:20 ` Thomas Huth
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ani Sinha @ 2023-10-27 6:51 UTC (permalink / raw)
To: zhujun2; +Cc: qemu-devel, mst, imammedo, thuth, lvivier
> 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
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: Fix printf format string in acpi-utils.c
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
2023-10-27 6:51 ` Ani Sinha
@ 2023-10-27 8:20 ` Thomas Huth
2023-10-27 13:32 ` Markus Armbruster
2023-11-06 17:40 ` Michael S. Tsirkin
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Huth @ 2023-10-27 8:20 UTC (permalink / raw)
To: zhujun2, qemu-devel; +Cc: mst, imammedo, anisinha, lvivier
On 27/10/2023 05.09, zhujun2 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>
^-- Could you please use the proper spelling of
your name here?
You might need to create a proper "name = ..." entry in the "[user]" section
of your ~/.gitconfig file.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: Fix printf format string in acpi-utils.c
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
2023-10-27 6:51 ` Ani Sinha
2023-10-27 8:20 ` Thomas Huth
@ 2023-10-27 13:32 ` Markus Armbruster
2023-11-06 17:40 ` Michael S. Tsirkin
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-10-27 13:32 UTC (permalink / raw)
To: zhujun2; +Cc: qemu-devel, mst, imammedo, anisinha, thuth, lvivier
zhujun2 <zhujun2@cmss.chinamobile.com> writes:
> 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>
Please sign off with your real name.
You should be able to automate this by putting
[user]
email = armbru@redhat.com
name = Markus Armbruster
into ~/.gitconfig or git/config.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: Fix printf format string in acpi-utils.c
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
` (2 preceding siblings ...)
2023-10-27 13:32 ` Markus Armbruster
@ 2023-11-06 17:40 ` Michael S. Tsirkin
3 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2023-11-06 17:40 UTC (permalink / raw)
To: zhujun2; +Cc: qemu-devel, imammedo, anisinha, thuth, lvivier
On Thu, Oct 26, 2023 at 08:09:30PM -0700, zhujun2 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>
OK though I never expect this to matter.
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-06 17:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 3:09 [PATCH] tests: Fix printf format string in acpi-utils.c zhujun2
2023-10-27 6:51 ` Ani Sinha
2023-10-27 8:20 ` Thomas Huth
2023-10-27 13:32 ` Markus Armbruster
2023-11-06 17:40 ` Michael S. Tsirkin
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).