From: John Levon Subject: [PATCH] 13120:3e2d3d737624 breaks Solaris compile Date: Thu, 28 Dec 2006 17:39:08 +0000 Message-ID: <20061228173908.GA26571@totally.trollied.org.uk> References: <20061222142957.GA4041@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20061222142957.GA4041@totally.trollied.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Dec 22, 2006 at 02:29:57PM +0000, John Levon wrote: > Are both unneccessary on Linux (as they're const char * already), and > broken on Solaris, where we have rather unfortunate prototypes from > pre-history that aren't constified. I think these need to be reverted > back to being the meaningful '(char *)'. The below is still needed. regards john # HG changeset patch # User john.levon@sun.com # Date 1167321418 28800 # Node ID a00bf3c8f7bc8cb8537b153c61e6d09c9b494459 # Parent bce4fd687b7901de6f2e72ea37d92508eb3f5a77 Older curses implementations don't have const-safe prototypes, so we must cast. Signed-off-by: John Levon diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c --- a/tools/xenstat/xentop/xentop.c +++ b/tools/xenstat/xentop/xentop.c @@ -271,7 +271,7 @@ static void print(const char *fmt, ...) if (!batch) { if((current_row() < lines()-1)) { va_start(args, fmt); - vwprintw(stdscr, fmt, args); + vwprintw(stdscr, (char *)fmt, args); va_end(args); } } else { @@ -285,7 +285,7 @@ static void attr_addstr(int attr, const static void attr_addstr(int attr, const char *str) { attron(attr); - addstr(str); + addstr((char *)str); attroff(attr); }