From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95079 invoked by alias); 10 Feb 2020 14:08:21 -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 95009 invoked by uid 89); 10 Feb 2020 14:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Feb 2020 14:08:18 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 3540D1ED42; Mon, 10 Feb 2020 09:08:16 -0500 (EST) Subject: Re: [PATCH][gdb] Fix -Wstrict-null-sentinel warnings To: Tom de Vries , Tom Tromey Cc: Christian Biesinger , gdb-patches References: <20200207113429.GA6532@delia> <7a8ea599-5254-46be-95b3-fa2af134656d@simark.ca> <99e7c8e5-8662-5b66-9d05-6ec3581b08bd@suse.de> <87v9ofx4s8.fsf@tromey.com> <5588f044-4f8b-ff32-070a-aacf7932671f@suse.de> From: Simon Marchi Message-ID: <0e65dcad-227e-1612-7d7d-f6de9db40493@simark.ca> Date: Mon, 10 Feb 2020 14:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <5588f044-4f8b-ff32-070a-aacf7932671f@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00283.txt.bz2 On 2020-02-10 5:18 a.m., Tom de Vries wrote: > [ was: Re: [PATCH][gdb] Mention CU offset for if verbose ] > > On 09-02-2020 14:35, Tom Tromey wrote: >>>>>>> "Tom" == Tom de Vries writes: >> >> Tom> + debug_filename.reset (concat (artificial, "@", >> Tom> + sect_offset_str (per_cu->sect_off), NULL)); >> >> When passing NULL to concat, you either need nullptr or (char *) NULL. > > Fixed in attached patch. > > OK for trunk? I think we usually put a space after the cast: (char *) NULL Also, if we want to enforce this warning, it should be added to gdb/warning.m4. Makefiles in gdb/ and gdbserver/ should be re-generated. gdbsupport/ doesn't use AM_GDB_WARNINGS at the moment. Simon