From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5679 invoked by alias); 29 Jun 2007 01:02:46 -0000 Received: (qmail 5670 invoked by uid 22791); 29 Jun 2007 01:02:45 -0000 X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Jun 2007 01:02:43 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l5T12gUS017585; Thu, 28 Jun 2007 18:02:42 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Thu, 28 Jun 2007 18:02:41 -0700 (PDT) Message-ID: <9780.12.7.175.2.1183078961.squirrel@webmail.sonic.net> In-Reply-To: <20070629004328.GA18113@caradoc.them.org> References: <5515.12.7.175.2.1183077423.squirrel@webmail.sonic.net> <20070629004328.GA18113@caradoc.them.org> Date: Fri, 29 Jun 2007 01:36:00 -0000 Subject: Re: [OB] pointer ref, m2-typeprint.c From: msnyder@sonic.net To: msnyder@sonic.net, gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00515.txt.bz2 > Ooh thanks, that seems to have fixed attachments. > > On Thu, Jun 28, 2007 at 05:37:03PM -0700, msnyder@sonic.net wrote: >> CHECK_TYPEDEF (type); >> - code = TYPE_CODE (type); > > Coverity's software is a tool, not a goal, and it's no substitute for > knowing what the code is doing. Daniel, I know what the code is doing. I'm not doing this without analyzing things. Doesn't mean I can't make a mistake -- but I'm not just doing things blindly... > Please stop moving things around just to make it happy. I wouldn't do that. > If the second line I quoted could crash, the first > line definitely will; so if TYPE can really be NULL here, we should > fix it properly (instead of this change, which removes the helpful > notice that something is wrong :-). Nooooo... I don't think my change removes any notice. Take another look, please? You may be right that CHECK_TYPEDEF is also a deref. I confess I took that for granted without checking it. I always assumed that CHECK_TYPEDEF was safe, since we so often blythely call it without checking. I guess it's not...