From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from buffalo.birch.relay.mailchannels.net (buffalo.birch.relay.mailchannels.net [23.83.209.24]) by sourceware.org (Postfix) with ESMTPS id 881403992038 for ; Wed, 28 Jul 2021 11:23:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 881403992038 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 712A6701B75; Wed, 28 Jul 2021 11:23:43 +0000 (UTC) Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-101-162-69.trex.outbound.svc.cluster.local [100.101.162.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0275F701E55; Wed, 28 Jul 2021 11:23:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a75.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.69 (trex/6.3.3); Wed, 28 Jul 2021 11:23:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Harmony-Thoughtful: 7e9731ff68be2ab0_1627471423314_1036622043 X-MC-Loop-Signature: 1627471423314:2017097633 X-MC-Ingress-Time: 1627471423314 Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id B5CFE8C383; Wed, 28 Jul 2021 04:23:42 -0700 (PDT) Received: from [192.168.1.153] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 1D8338C382; Wed, 28 Jul 2021 04:23:40 -0700 (PDT) Subject: Re: [PATCH v2] xmalloc: Fix warnings with gcc analyzer To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20210728103345.4065595-1-siddhesh@sourceware.org> <87sfzy8zcv.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a75 From: Siddhesh Poyarekar Message-ID: <6285ea15-68a1-38a0-712c-f47188275951@sourceware.org> Date: Wed, 28 Jul 2021 16:53:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87sfzy8zcv.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3486.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 11:23:45 -0000 On 7/28/21 4:44 PM, Florian Weimer via Libc-alpha wrote: > * Siddhesh Poyarekar: > >> extern void *xrealloc (void *o, size_t n) >> + __attribute_malloc__ __attribute_alloc_size__ ((2)) __attr_dealloc_free >> + __returns_nonnull; > > Sorry, this one has again __returns_nonnull for xrealloc. The xrealloc in programs does a malloc(1) if the size requested is 0, so it never really returns a NULL. Siddhesh