From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 506041F601; Fri, 9 Dec 2022 01:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1670550339; bh=F0x2IIUQEHj01pbs+3pV58ormob7UapEijvawszLni8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=lsE7IpxXZdZTUz/prQ7ITSaoTmkMhKi08aO+ETxo9EJCJSqnOWdIkCS5DHG5pNESQ axrHMrCjYLgrELxGt29k8/p2DHYllvwDoLwgC6zAf4YCWukjjrgUWDq1Ary4x/iTId VYo8zLdDEx708iRzPqQWc8Bv1rI+/T819t6sACsw= Date: Fri, 9 Dec 2022 01:45:38 +0000 From: Eric Wong To: mwrap-perl@80x24.org Subject: Re: [PATCH] provide mwrap_assert due to Perl header conflicts Message-ID: <20221209014538.M883508@dcvr> References: <20221202111715.822960-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221202111715.822960-1-e@80x24.org> List-Id: Eric Wong 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;