This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 2/2] gdb: Fix a type of sentinel
- From: "Aktemur, Tankut Baris" <tankut dot baris dot aktemur at intel dot com>
- To: Simon Marchi <simark at simark dot ca>, Lukas Durfina <ldurfina at tachyum dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 28 Jan 2020 17:06:28 +0000
- Subject: RE: [PATCH 2/2] gdb: Fix a type of sentinel
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jb5TPsc+3w3sGkeoNciiRSRsIEEG5h15/e87ImS7nK0=; b=Y4q20xvpLYCJxYbsLlVgCjnUAXdDwyXjXQduLqzN7a1T6uwEewHt3jOPrzJ8uqKsaQCIt5wjAzLs6T4qmlt/MbWDdcXwnhWm94+dmKL3DeAybXeAgABDf0QgjhwdsAF1ruDN5Nzy0DGIsGYiFPRdudkKeJIyiuddIaMuyZRy42Xbu/BqktqgYZh5sYxMhfF2Nod8jqgF0sGQ609i6d+RP/qB7zecVq33h5eE41eUiLpRtO+Fnf3Knbi+oj4czsNKQL82ziWN4lShfPJXU0+rzpkjgCEA8oi9I0gaFThHeGYOyebaq1l49+TTF9Fa5xSsyhSfZcfoXVQbQ1Cg3ljmMA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q4nx5gHX3H76tPRF0KEe8ElTVvoLXA5VPK+hYdJdUf7ahwKMZaehuR0TWAXDXpdFyom9qU3U6TXcXZ9rWgczUtwt4tz8I0C+zUgDSmMQChz66jAleQ7yvotnpDFbSSJA5jPMkEVOE/loupbxQGRp5xgG7z7ufKaCx6AGaJjC52Yt5+g6rYwF9wXxPEsi72deeOQ1hmObDduK8/UYoIP70gF21eRMHghhi91YqUi3cCJyIR9UO/2E9p+W1p+3Pl8agzsodlQVrEg03teR6w6f3y5gNvP0AHVL4eq2HwXBFHpOXZi2Cdrwjgc4JYIjmgzy6mY0FIosENw4kjED0xJP7w==
- References: <20200128142830.89282-1-ldurfina@tachyum.com> <20200128142830.89282-2-ldurfina@tachyum.com> <920e08c2-dfc3-bb13-21e7-90635341df77@simark.ca>
On Tuesday, January 28, 2020 5:44 PM, Simon Marchi wrote:
> On 2020-01-28 9:28 a.m., Lukas Durfina wrote:
> > ---
> > gdb/ChangeLog | 4 ++++
> > gdb/charset.c | 2 +-
> > 2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> > index 8b6da62bd4..1dd89ae2e0 100644
> > --- a/gdb/ChangeLog
> > +++ b/gdb/ChangeLog
> > @@ -1,3 +1,7 @@
> > +2020-01-28 Lukas Durfina <ldurfina@tachyum.com>
> > +
> > + * charset.c (find_charset_names): Fix a type of sentinel.
> > +
> > 2020-01-26 Tom Tromey <tom@tromey.com>
> >
> > * ctfread.c (struct ctf_fp_info): Reindent.
> > diff --git a/gdb/charset.c b/gdb/charset.c
> > index 5cfd2d8030..abf795ce6d 100644
> > --- a/gdb/charset.c
> > +++ b/gdb/charset.c
> > @@ -818,7 +818,7 @@ find_charset_names (void)
> > {
> > std::string iconv_dir = relocate_gdb_directory (ICONV_BIN,
> > ICONV_BIN_RELOCATABLE);
> > - iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", NULL);
> > + iconv_program = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", (char *) NULL);
> > }
> > #else
> > iconv_program = xstrdup ("iconv");
> > --
> > 2.17.1
> >
>
> Hi Lukas,
>
> Same comment as patch 1/2.
>
> If this change fixes the same problem as patch 1/2, then you can put
> both changes in the same patch.
>
> Simon
Now that the line is being touched, it might also be a good idea to replace
NULL with nullptr.
-Baris
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928