From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121287 invoked by alias); 30 Aug 2015 10:09:53 -0000 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 Received: (qmail 121237 invoked by uid 89); 30 Aug 2015 10:09:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f173.google.com Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 30 Aug 2015 10:09:51 +0000 Received: by wicpl12 with SMTP id pl12so5268574wic.0 for ; Sun, 30 Aug 2015 03:09:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=wz1RVMncsHcNsliBWi+NGdm9Iuun0mc6l45id6IshhY=; b=lH2ot962zzgY8fAf1XFpZ542pOuipEp3rVOIvF3cUZpKUgliMhefIR+qh07T9jgVvN 82PyKgNQEBraNYpGsUIuDhuQsJgZmpmLEE+57/hDR5SA9EsfI/YeIipd7l23kXm4nVSQ Yi4BaUlTV8Ib1yFgFEgzGXyC4Eg+TGiIGmGVfF5HYEYVQMe2XSfSF7Ao7LGEZjelHJ0T ov+yNk2QSyyuWRP1Zh/ODQ9bOeroifn5KmSNu4y3Rpg5uvd4Yg/b7C2ufUROYVmHWITz 4Xte6wVh1eHqOTzV5iJ6XKgIhn4jrNIGzIdLnIGyo2ef5VaSg9Uy8S0dilUkNUX9tk5f muAg== X-Gm-Message-State: ALoCoQnCERF+g7HMyTLakvnY6zkwJH8oyLoZvpxF7karh5xfm5ClAtknZO8yC9ktDBVzPlXUyj0y X-Received: by 10.180.23.71 with SMTP id k7mr4277861wif.5.1440929388593; Sun, 30 Aug 2015 03:09:48 -0700 (PDT) Received: from localhost (host86-146-54-249.range86-146.btcentralplus.com. [86.146.54.249]) by smtp.gmail.com with ESMTPSA id jr5sm16714904wjc.14.2015.08.30.03.09.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Aug 2015 03:09:48 -0700 (PDT) Date: Sun, 30 Aug 2015 10:09:00 -0000 From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [RFC] Casting NULL pointer Message-ID: <20150830100944.GA3916@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00854.txt.bz2 There are a small (~26) number of places where the NULL pointer is cast list this: char *wname = (char *) NULL; This compares to a huge number of places (~726) where we don't use a cast, so: const char *name = NULL; I've never thought that the cast was either necessary or a particularly good idea, it feels like unneeded clutter. I only ask because I was about to push an obvious change that made a minor edit to a line containing one of the above casts. I was tempted to remove the cast, in this case, as a clean up; however, I'm looking for confirmation that such a change would be viewed as clean up, and not an unnecessary change. As a follow on, given the small number, I'm happy to submit a patch(es) to remove all of these casts, if its felt that would be a reasonable clean up. Thanks, Andrew