public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Craig Howland <howland@LGSInnovations.com>
To: <newlib@sourceware.org>
Subject: Re: Use of initialized variable in strtod.c
Date: Wed, 15 Mar 2017 22:47:00 -0000	[thread overview]
Message-ID: <bb2c4038-dcbb-7754-ec3e-40a2bc9d78c8@LGSInnovations.com> (raw)
In-Reply-To: <5a3ecf1c-1f4f-cce6-6b3e-b933cf87fa28@oarcorp.com>

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

  reply	other threads:[~2017-03-15 22:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 18:16 Joel Sherrill
2017-03-15 18:34 ` Craig Howland
2017-03-15 18:38   ` Joel Sherrill
2017-03-15 18:56     ` Craig Howland
2017-03-15 19:31       ` Jeffrey Walton
2017-03-15 19:54         ` Joel Sherrill
2017-03-15 20:03           ` Joel Sherrill
2017-03-15 22:37             ` Joel Sherrill
2017-03-15 22:47               ` Craig Howland [this message]
2017-03-16  8:32       ` Corinna Vinschen

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=bb2c4038-dcbb-7754-ec3e-40a2bc9d78c8@LGSInnovations.com \
    --to=howland@lgsinnovations.com \
    --cc=newlib@sourceware.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.
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).