From 48ceeb6a14b1c1bac3185e8e9b938ab70f97759d Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Tue, 1 Aug 2017 17:48:39 +0200 Subject: [PATCH] Clang 4.0.0 fix for Bochs Clang 4.0.0, which ac++ links against since today, throws an error in the Bochs code. config.cc:3480:55: error: ordered comparison between pointer and zero ('char *' and 'int') if (SIM->get_param_string("model", base)->getptr()>0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ Change-Id: I8404a54acd468bf71cbf29867657f9458f3a4c3f --- simulators/bochs/config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulators/bochs/config.cc b/simulators/bochs/config.cc index ca2e0f38..7be537b1 100755 --- a/simulators/bochs/config.cc +++ b/simulators/bochs/config.cc @@ -3477,7 +3477,7 @@ int bx_write_atadevice_options(FILE *fp, Bit8u channel, Bit8u drive, bx_list_c * fprintf(fp, ", biosdetect=%s", SIM->get_param_enum("biosdetect", base)->get_selected()); - if (SIM->get_param_string("model", base)->getptr()>0) { + if (SIM->get_param_string("model", base)->getptr()) { fprintf(fp, ", model=\"%s\"", SIM->get_param_string("model", base)->getptr()); }