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: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2B2C91F8C6 for ; Sat, 7 Aug 2021 17:21:57 +0000 (UTC) Received: from localhost ([::1]:58940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCQ1E-00023U-B5 for normalperson@yhbt.net; Sat, 07 Aug 2021 13:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCQ1A-00023M-Vt for bug-gnulib@gnu.org; Sat, 07 Aug 2021 13:21:53 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:32560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCQ19-0000rZ-C1 for bug-gnulib@gnu.org; Sat, 07 Aug 2021 13:21:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1628356909; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=V05J5WIuUPTf14Cc36ZrYNLOICi0y1zsNQ645JfuKug=; b=iektAjRUQFkrhs2yBV41Ssdnr07Kaux07HKiJZt0gEPmdati53xo2gnTK7nmPNWNVG VPDJmH2n/zWenT/OlGp7hauWDACWcz1MgOaZ5Dz8QfeI3/mkewHrqRswPEoIbWAvS3aj MRwk/asJp24f48cY+v1Tzv2OWpxfb/4EZ48zX7UbbKPSuzc/iNKzLVvs7TnrLpvwAU47 /aObrKnBYTQr4ItoEPYxKMCsKnNiDitloXmbxd7mc4OUkOt7c1oq04yI5cZL84R0Uqjx NBdcZgP9SFhyeXnV67VNT/3fXd175ioQ7ltaQe6SdaD2kAfIt8WhaAZaYJkrcU2siyY6 BM8A== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH/DXj0JGsbh0vbrMZq" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.31.0 DYNA|AUTH) with ESMTPSA id I0a189x77HLnFmF (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 7 Aug 2021 19:21:49 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: canon-host: Improve GCC 11 allocation-deallocation checking Date: Sat, 07 Aug 2021 19:21:49 +0200 Message-ID: <2352458.O1IUMocyEE@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.52; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 2021-08-07 Bruno Haible canon-host: Improve GCC 11 allocation-deallocation checking. * lib/canon-host.h: Include . (canon_host, canon_host_r): Declare that deallocation must happen through 'free'. diff --git a/lib/canon-host.h b/lib/canon-host.h index fb35bfe..2891925 100644 --- a/lib/canon-host.h +++ b/lib/canon-host.h @@ -20,8 +20,12 @@ #ifndef CANON_HOST_H # define CANON_HOST_H 1 -char *canon_host (char const *host) _GL_ATTRIBUTE_MALLOC; -char *canon_host_r (char const *host, int *cherror) _GL_ATTRIBUTE_MALLOC; +# include + +char *canon_host (char const *host) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; +char *canon_host_r (char const *host, int *cherror) + _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE; const char *ch_strerror (void); # define ch_strerror_r(cherror) gai_strerror (cherror);