From: Ingo Weinhold <ingo_weinhold@gmx.de>
To: HaikuPorts developers discussion list
<haikuports-devs@ports.haiku-files.org>
Cc: "Blue Swirl" <blauwirbel@gmail.com>,
"Andreas Färber" <andreas.faerber@web.de>,
"Stefan Hajnoczi" <stefanha@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [HaikuPorts-devs] [PATCH] trace: Adapt trace file name for Haiku
Date: Sat, 09 Oct 2010 23:18:04 +0200 [thread overview]
Message-ID: <20101009231804.356.1@knochen-vm.localdomain> (raw)
In-Reply-To: <1286654117-16193-1-git-send-email-andreas.faerber@web.de>
On 2010-10-09 at 21:55:17 [+0200], Andreas Färber <andreas.faerber@web.de> wrote:
> Resolves the following warning:
>
> CC simpletrace.o
> /Data/QEMU/qemu/simpletrace.c: In function 'st_set_trace_file':
> /Data/QEMU/qemu/simpletrace.c:77: warning: format '%u' expects type
> 'unsigned int', but argument 3 has type 'pid_t'
>
> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> ---
> configure | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index d303061..3e694a2 100755
> --- a/configure
> +++ b/configure
> @@ -2609,7 +2609,11 @@ if test "$trace_backend" = "simple"; then
> fi
> # Set the appropriate trace file.
> if test "$trace_backend" = "simple"; then
> - trace_file="\"$trace_file-%u\""
> + if test "$haiku" = "yes"; then
> + trace_file="\"$trace_file-%lu\""
> + else
> + trace_file="\"$trace_file-%u\""
> + fi
> fi
> echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
>
> --
> 1.7.3
Please don't apply. The patch doesn't work for 64 bit Haiku.
According to POSIX:
"blksize_t, pid_t, and ssize_t shall be signed integer types."
and
"... the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t are no greater
than the width of type long"
So a safe and portable solution would be to use "%ld" and cast the pid_t to long.
CU, Ingo
next prev parent reply other threads:[~2010-10-09 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 19:55 [Qemu-devel] [PATCH] trace: Adapt trace file name for Haiku Andreas Färber
2010-10-09 21:18 ` Ingo Weinhold [this message]
2010-10-10 11:45 ` [Qemu-devel] [PATCH v2] " Andreas Färber
2010-10-11 9:23 ` Stefan Hajnoczi
2011-06-02 17:58 ` [Qemu-devel] [PATCH v3] Introduce format string for pid_t Andreas Färber
2011-06-15 20:26 ` Blue Swirl
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=20101009231804.356.1@knochen-vm.localdomain \
--to=ingo_weinhold@gmx.de \
--cc=andreas.faerber@web.de \
--cc=blauwirbel@gmail.com \
--cc=haikuports-devs@ports.haiku-files.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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).