From: Eric Wong <e@80x24.org>
To: mwrap-perl@80x24.org
Subject: Re: [PATCH] provide mwrap_assert due to Perl header conflicts
Date: Fri, 9 Dec 2022 01:45:38 +0000 [thread overview]
Message-ID: <20221209014538.M883508@dcvr> (raw)
In-Reply-To: <20221202111715.822960-1-e@80x24.org>
Eric Wong <e@80x24.org> wrote:
> diff --git a/mwrap_core.h b/mwrap_core.h
> index e7723c2..11b7346 100644
> --- a/mwrap_core.h
> +++ b/mwrap_core.h
> @@ -690,7 +690,7 @@ static void dump_destructor(void)
> char *end = strchr(dump_path, ',');
> if (end) {
> char *tmp = tsd.kbuf;
> - assert((end - dump_path) < sizeof(tsd.kbuf));
> + mwrap_assert((end - dump_path) < sizeof(tsd.kbuf));
-Wsign-compare alerted me to this:
diff --git a/mwrap_core.h b/mwrap_core.h
index 11b7346..772026f 100644
--- a/mwrap_core.h
+++ b/mwrap_core.h
@@ -690,7 +690,8 @@ static void dump_destructor(void)
char *end = strchr(dump_path, ',');
if (end) {
char *tmp = tsd.kbuf;
- mwrap_assert((end - dump_path) < sizeof(tsd.kbuf));
+ mwrap_assert((end - dump_path) <
+ (intptr_t)sizeof(tsd.kbuf));
end = mempcpy(tmp, dump_path, end - dump_path);
*end = 0;
dump_path = tmp;
prev parent reply other threads:[~2022-12-09 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 11:17 [PATCH] provide mwrap_assert due to Perl header conflicts Eric Wong
2022-12-09 1:45 ` Eric Wong [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=20221209014538.M883508@dcvr \
--to=e@80x24.org \
--cc=mwrap-perl@80x24.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mwrap-perl.git
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).