From: Mark Geisert <mark@maxrnd.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: Fix profiler error() definition and usage
Date: Tue, 14 Nov 2023 00:57:30 -0800 (PST) [thread overview]
Message-ID: <Pine.BSF.4.63.2311140055190.11286@m0.truegem.net> (raw)
In-Reply-To: <ZVJXISABdv5P8pqw@calimero.vinschen.de>
Hi Corinna,
On Mon, 13 Nov 2023, Corinna Vinschen wrote:
> On Nov 13 01:46, Mark Geisert wrote:
>> Minor updates to profiler and gmondump, which share some code:
>> - fix operation of error() so it actually works as intended
>> - resize 4K-size auto buffer reservations to BUFSIZ (==1K)
>> - remove trailing '\n' from 2nd arg on error() calls everywhere
>> - provide consistent annotation of Windows error number displays
>>
>> Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler")
>> Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump")
>> Signed-off-by: Mark Geisert <mark@maxrnd.com>
>
> Looks good basically, but I noticed some minor problem already
> in the former version of this code:
>
>> @@ -650,7 +652,7 @@ ctrl_c (DWORD)
>> static int tic = 1;
>>
>> if ((tic ^= 1) && !GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0))
>> - error (0, "couldn't send CTRL-C to child, win32 error %d\n",
>> + error (0, "couldn't send CTRL-C to child, Windows error %d",
>> GetLastError ());
>> return TRUE;
>
> GetLastError returns a DWORD == unsigned int. %u would be the
> right format specifier. Care to fix that, too?
Thanks for catching this. Patch v2 is incoming, and it includes a
relnote for 3.4.10.
Cheers & Regards,
..mark
prev parent reply other threads:[~2023-11-14 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 9:46 Mark Geisert
2023-11-13 17:04 ` Corinna Vinschen
2023-11-14 8:57 ` Mark Geisert [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=Pine.BSF.4.63.2311140055190.11286@m0.truegem.net \
--to=mark@maxrnd.com \
--cc=cygwin-patches@cygwin.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 read-only IMAP folder(s) and NNTP newsgroup(s).