All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: zhujun2 <zhujun2@cmss.chinamobile.com>
Cc: qemu-devel@nongnu.org, imammedo@redhat.com, anisinha@redhat.com,
	thuth@redhat.com, lvivier@redhat.com
Subject: Re: [PATCH] tests: Fix printf format string in acpi-utils.c
Date: Mon, 6 Nov 2023 12:40:46 -0500	[thread overview]
Message-ID: <20231106123942-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20231027030930.7739-1-zhujun2@cmss.chinamobile.com>

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
> 
> 



      parent reply	other threads:[~2023-11-06 17:41 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
2023-10-27  8:20 ` Thomas Huth
2023-10-27 13:32 ` Markus Armbruster
2023-11-06 17:40 ` Michael S. Tsirkin [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=20231106123942-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lvivier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.