From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19333 invoked by alias); 29 May 2005 06:13:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19319 invoked by uid 22791); 29 May 2005 06:13:08 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 29 May 2005 06:13:08 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-200-187.inter.net.il [83.130.200.187]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id BJJ05166 (AUTH halo1); Sun, 29 May 2005 09:12:56 +0300 (IDT) Date: Sun, 29 May 2005 07:41:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org In-reply-to: <20050528182825.GD26806@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 28 May 2005 14:28:26 -0400) Subject: Re: [commit] Fix "show prompt" Reply-to: Eli Zaretskii References: <20050528182825.GD26806@nevyn.them.org> X-SW-Source: 2005-05/txt/msg00611.txt.bz2 > Date: Sat, 28 May 2005 14:28:26 -0400 > From: Daniel Jacobowitz > > One of the gcc4 warnings patches incorrectly converted the var_string > case; it's a char **, not a char *. True. > switch (c->var_type) > { > case var_string: > - if (((char *)c->var)[0] != '\0') > - fputstr_filtered ((char *)c->var, '"', stb->stream); > + if (*(char **) c->var) Doesn't this work without a cast, like this: if (*c->var != NULL) ? I think we should avoid unneeded type-casting.