From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111091 invoked by alias); 15 Mar 2017 22:47:47 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 111082 invoked by uid 89); 15 Mar 2017 22:47:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:2264cd1, H*f:sk:YiZw@ma, H*f:sk:CAH8yC8, H*f:LyyXJuNuAPR X-HELO: mail02.lgsinnovations.com Received: from mail02.lgsinnovations.com (HELO mail02.lgsinnovations.com) (63.149.110.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Mar 2017 22:47:46 +0000 Subject: Re: Use of initialized variable in strtod.c To: References: <788987e9-9b0d-4bfd-b40a-38c219bd8a17@oarcorp.com> <47ea65c0-130a-e138-3c7c-0c1a636d87fd@oarcorp.com> <2264cd14-0e03-2aad-f95e-562394435c0b@LGSInnovations.com> <5a3ecf1c-1f4f-cce6-6b3e-b933cf87fa28@oarcorp.com> From: Craig Howland Message-ID: Date: Wed, 15 Mar 2017 22:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <5a3ecf1c-1f4f-cce6-6b3e-b933cf87fa28@oarcorp.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LGS-EX05.lgsdirect.com (135.22.48.227) To LGS-EX02.lgsdirect.com (135.22.77.165) X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00184.txt.bz2 On 03/15/2017 06:36 PM, Joel Sherrill wrote: > But this in __call_atexit.c is definitely correct. It is > treating free() as a weak symbol and the only way to > silence Coverity is to add an annotation. > > 136 /* Don't dynamically free the atexit array if free is not > 137 available. */ > > CID 175323 (#1 of 1): Function address comparison (BAD_COMPARE) > func_conv: This implicit conversion to a function pointer is suspicious: free. > Did you intend to call free? > 138 if (!free) > 139 break; This should be able to be gotten rid of easily enough. (I don't see why the "weak" aspect would have anything to do with it.) For example: if(free == NULL) if(!(uintptr_t)free) Craig