warning fixes
This commit is contained in:
parent
1b8988f698
commit
d30a0d3699
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CC="xlc"
|
||||
export CXX="xlC"
|
||||
export CFLAGS="-qcpluscmt"
|
||||
export CXXFLAGS=""
|
||||
|
||||
./configure
|
||||
|
@ -8,23 +8,23 @@ Changes after 2.3.5 release:
|
||||
- Implemented MTRR emulation, to enable use --enable-mtrr configure
|
||||
option. MTRRs is enabled by default when cpu-level >= 6.
|
||||
- Removed hostasm optimizations, after Bochs rebenchmarking it was found
|
||||
out that the feature bringing no speedup or even sometimes slowes
|
||||
emulation down !
|
||||
that the feature bringing no speedup or even sometimes slowes down
|
||||
the emulation !
|
||||
- Many minor bugfixes in CPU emulation (both ia32 and x86-64)
|
||||
|
||||
- Bochs Internal Debugger and Disassember
|
||||
- Many fixes in Bochs internal debugger and disassembler, some debugger
|
||||
interfaces significantly changed due transition to the param tree
|
||||
architecture
|
||||
- Added support of restoring of the CPU state from external file
|
||||
- Added support for restoring of the CPU state from external file
|
||||
directly from Bochs debugger
|
||||
|
||||
- Configure and compile
|
||||
- rename configure option --enable-4meg-pages to --enable-large-pages.
|
||||
The option enables page size extensions (PSE) which refers to 2M pages
|
||||
as well.
|
||||
- removed -enable-save-restore configure option, save/restore feature
|
||||
changed to be one the basic Bochs features and compiled by default
|
||||
- removed --enable-save-restore configure option, save/restore feature
|
||||
changed to be one of the basic Bochs features and compiled by default
|
||||
for all configurations.
|
||||
- added new Bochs benchmark mode. To run Bochs in benchmark mode execute
|
||||
it with new command line option 'bochs -benchmark time'. The emulation
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: bochs.h,v 1.211 2007-10-16 16:17:48 sshwarts Exp $
|
||||
// $Id: bochs.h,v 1.212 2007-10-24 23:27:24 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -278,7 +278,7 @@ public:
|
||||
#else
|
||||
void ask (int level, const char *prefix, const char *fmt, va_list ap);
|
||||
#endif
|
||||
void put(char *);
|
||||
void put(const char *);
|
||||
void settype(int);
|
||||
void setio(class iofunctions *);
|
||||
void setonoff(int loglev, int value) {
|
||||
@ -354,16 +354,16 @@ public:
|
||||
else return "?";
|
||||
}
|
||||
char *getaction(int i) {
|
||||
static char *name[] = { "ignore", "report", "ask", "fatal" };
|
||||
static const char *name[] = { "ignore", "report", "ask", "fatal" };
|
||||
assert (i>=ACT_IGNORE && i<N_ACT);
|
||||
return name[i];
|
||||
return (char *) name[i];
|
||||
}
|
||||
|
||||
protected:
|
||||
int n_logfn;
|
||||
#define MAX_LOGFNS 128
|
||||
logfunc_t *logfn_list[MAX_LOGFNS];
|
||||
char *logfn;
|
||||
const char *logfn;
|
||||
};
|
||||
|
||||
typedef class BOCHSAPI iofunctions iofunc_t;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: config.cc,v 1.122 2007-09-28 19:51:37 sshwarts Exp $
|
||||
// $Id: config.cc,v 1.123 2007-10-24 23:27:39 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -46,7 +46,7 @@ int bochsrc_include_count = 0;
|
||||
|
||||
extern bx_debug_t bx_dbg;
|
||||
|
||||
static char *get_builtin_variable(char *varname);
|
||||
static const char *get_builtin_variable(const char *varname);
|
||||
static Bit32s parse_line_unformatted(const char *context, char *line);
|
||||
static Bit32s parse_line_formatted(const char *context, int num_params, char *params[]);
|
||||
static int parse_bochsrc(const char *rcfile);
|
||||
@ -335,7 +335,7 @@ void bx_init_options()
|
||||
menu = new bx_list_c(root_param, "general", "");
|
||||
|
||||
// config interface option, set in bochsrc or command line
|
||||
static char *config_interface_list[] = {
|
||||
static const char *config_interface_list[] = {
|
||||
#if BX_USE_TEXTCONFIG
|
||||
"textconfig",
|
||||
#endif
|
||||
@ -460,7 +460,7 @@ void bx_init_options()
|
||||
"Pathname of ROM image to load",
|
||||
"", BX_PATHNAME_LEN);
|
||||
path->set_format("Name of ROM BIOS image: %s");
|
||||
sprintf(name, "%s/BIOS-bochs-latest", get_builtin_variable("BXSHARE"));
|
||||
sprintf(name, "%s/BIOS-bochs-latest", (char *)get_builtin_variable("BXSHARE"));
|
||||
path->set_initial_val(name);
|
||||
bx_param_num_c *romaddr = new bx_param_num_c(rom,
|
||||
"addr",
|
||||
@ -666,7 +666,7 @@ void bx_init_options()
|
||||
// compile time. The one that is listed first will be the default,
|
||||
// which is used unless the user overrides it on the command line or
|
||||
// in a configuration file.
|
||||
static char *display_library_list[] = {
|
||||
static const char *display_library_list[] = {
|
||||
#if BX_WITH_X11
|
||||
"x",
|
||||
#endif
|
||||
@ -803,7 +803,7 @@ void bx_init_options()
|
||||
"none", 20);
|
||||
user_shortcut->set_runtime_param(1);
|
||||
|
||||
static char *mouse_type_list[] = {
|
||||
static const char *mouse_type_list[] = {
|
||||
"none",
|
||||
"ps2",
|
||||
"imps2",
|
||||
@ -987,17 +987,17 @@ void bx_init_options()
|
||||
bx_list_c *ata = new bx_list_c(root_param, "ata", "ATA/ATAPI Options");
|
||||
|
||||
// disk options
|
||||
char *s_atachannel[] = {
|
||||
const char *s_atachannel[] = {
|
||||
"ATA channel 0",
|
||||
"ATA channel 1",
|
||||
"ATA channel 2",
|
||||
"ATA channel 3",
|
||||
};
|
||||
char *s_atadevname[2] = {
|
||||
const char *s_atadevname[2] = {
|
||||
"master",
|
||||
"slave",
|
||||
};
|
||||
char *s_atadevice[4][2] = {
|
||||
const char *s_atadevice[4][2] = {
|
||||
{ "First HD/CD on channel 0",
|
||||
"Second HD/CD on channel 0" },
|
||||
{ "First HD/CD on channel 1",
|
||||
@ -1250,7 +1250,7 @@ void bx_init_options()
|
||||
enabled->set_dependent_list(deplist);
|
||||
}
|
||||
|
||||
static char *serial_mode_list[] = {
|
||||
static const char *serial_mode_list[] = {
|
||||
"null",
|
||||
"file",
|
||||
"term",
|
||||
@ -1322,7 +1322,7 @@ void bx_init_options()
|
||||
network->get_options()->set(bx_list_c::USE_TAB_WINDOW | bx_list_c::SHOW_PARENT);
|
||||
|
||||
// ne2k & pnic options
|
||||
static char *eth_module_list[] = {
|
||||
static const char *eth_module_list[] = {
|
||||
"null",
|
||||
#if defined(ETH_LINUX)
|
||||
"linux",
|
||||
@ -1753,7 +1753,7 @@ static int parse_bochsrc(const char *rcfile)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static char *get_builtin_variable(char *varname)
|
||||
static const char *get_builtin_variable(const char *varname)
|
||||
{
|
||||
#ifdef WIN32
|
||||
int code;
|
||||
@ -1837,7 +1837,7 @@ static Bit32s parse_line_unformatted(const char *context, char *line)
|
||||
if (ptr[i] == '$') {
|
||||
char varname[512];
|
||||
char *pv = varname;
|
||||
char *value;
|
||||
const char *value;
|
||||
*pv = 0;
|
||||
i++;
|
||||
while (isalpha(ptr[i]) || ptr[i]=='_') {
|
||||
@ -1847,14 +1847,14 @@ static Bit32s parse_line_unformatted(const char *context, char *line)
|
||||
if (strlen(varname)<1 || !(value = getenv(varname))) {
|
||||
if ((value = get_builtin_variable(varname))) {
|
||||
// append value to the string
|
||||
for (pv=value; *pv; pv++)
|
||||
for (pv=(char *)value; *pv; pv++)
|
||||
string[string_i++] = *pv;
|
||||
} else {
|
||||
BX_PANIC (("could not look up environment variable '%s'", varname));
|
||||
}
|
||||
} else {
|
||||
// append value to the string
|
||||
for (pv=value; *pv; pv++)
|
||||
for (pv=(char *)value; *pv; pv++)
|
||||
string[string_i++] = *pv;
|
||||
}
|
||||
}
|
||||
@ -3047,7 +3047,7 @@ static Bit32s parse_line_formatted(const char *context, int num_params, char *pa
|
||||
}
|
||||
|
||||
|
||||
static char *fdtypes[] = {
|
||||
static const char *fdtypes[] = {
|
||||
"none", "1_2", "1_44", "2_88", "720k", "360k", "160k", "180k", "320k"
|
||||
};
|
||||
|
||||
|
@ -25,6 +25,7 @@ these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
#include "softfloatx80.h"
|
||||
#include "softfloat-round-pack.h"
|
||||
#define USE_estimateDiv128To64
|
||||
#include "softfloat-macros.h"
|
||||
|
||||
/* executes single exponent reduction cycle */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: fpu.cc,v 1.24 2007-09-11 13:11:03 sshwarts Exp $
|
||||
// $Id: fpu.cc,v 1.25 2007-10-24 23:29:17 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2003 Stanislav Shwartsman
|
||||
@ -532,7 +532,7 @@ void BX_CPU_C::print_state_FPU()
|
||||
#else
|
||||
f *= fp.fraction*scale_factor;
|
||||
#endif
|
||||
fprintf(stderr, "%sFPR%d(%c): %.10f (raw 0x%04x:%08x%08x)\n",
|
||||
fprintf(stderr, "%sFPR%d(%c): %.10f (raw 0x%04x:%08lx%08lx)\n",
|
||||
i==tos?"=>":" ",
|
||||
i,
|
||||
"v0s?"[BX_CPU_THIS_PTR the_i387.FPU_gettagi((i-tos)&7)],
|
||||
|
@ -25,6 +25,7 @@ these four paragraphs for those parts of this code that are retained.
|
||||
|
||||
#define FLOAT128
|
||||
|
||||
#define USE_estimateDiv128To64
|
||||
#include "softfloatx80.h"
|
||||
#include "softfloat-round-pack.h"
|
||||
#include "fpu_constant.h"
|
||||
|
@ -194,6 +194,7 @@ BX_CPP_INLINE void mul64To128(Bit64u a, Bit64u b, Bit64u *z0Ptr, Bit64u *z1Ptr)
|
||||
| unsigned integer is returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef USE_estimateDiv128To64
|
||||
static Bit64u estimateDiv128To64(Bit64u a0, Bit64u a1, Bit64u b)
|
||||
{
|
||||
Bit64u b0, b1;
|
||||
@ -214,6 +215,7 @@ static Bit64u estimateDiv128To64(Bit64u a0, Bit64u a1, Bit64u b)
|
||||
z |= (b0<<32 <= rem0) ? 0xFFFFFFFF : rem0 / b0;
|
||||
return z;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns an approximation to the square root of the 32-bit significand given
|
||||
@ -225,6 +227,7 @@ static Bit64u estimateDiv128To64(Bit64u a0, Bit64u a1, Bit64u b)
|
||||
| value.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef USE_estimateSqrt32
|
||||
static Bit32u estimateSqrt32(Bit16s aExp, Bit32u a)
|
||||
{
|
||||
static const Bit16u sqrtOddAdjustments[] = {
|
||||
@ -251,6 +254,7 @@ static Bit32u estimateSqrt32(Bit16s aExp, Bit32u a)
|
||||
}
|
||||
return ((Bit32u) ((((Bit64u) a)<<31) / z)) + (z>>1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Returns the number of leading 0 bits before the most-significant 1 bit of
|
||||
|
@ -42,6 +42,8 @@ these four paragraphs for those parts of this code that are retained.
|
||||
| division and square root approximations. (Can be specialized to target
|
||||
| if desired).
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define USE_estimateDiv128To64
|
||||
#define USE_estimateSqrt32
|
||||
#include "softfloat-macros.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: logio.cc,v 1.61 2007-10-18 22:44:38 sshwarts Exp $
|
||||
// $Id: logio.cc,v 1.62 2007-10-24 23:28:00 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -98,7 +98,7 @@ void iofunctions::init_log(const char *fn)
|
||||
// use newfd/newfn so that we can log the message to the OLD log
|
||||
// file descriptor.
|
||||
FILE *newfd = stderr;
|
||||
char *newfn = "/dev/stderr";
|
||||
const char *newfn = "/dev/stderr";
|
||||
if(strcmp(fn, "-") != 0) {
|
||||
newfd = fopen(fn, "w");
|
||||
if(newfd != NULL) {
|
||||
@ -146,7 +146,7 @@ void iofunctions::exit_log()
|
||||
if (logfd != stderr) {
|
||||
fclose(logfd);
|
||||
logfd = stderr;
|
||||
free(logfn);
|
||||
free((char *)logfn);
|
||||
logfn = "/dev/stderr";
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ void logfunctions::setio(iofunc_t *i)
|
||||
i->add_logfn(this);
|
||||
}
|
||||
|
||||
void logfunctions::put(char *p)
|
||||
void logfunctions::put(const char *p)
|
||||
{
|
||||
char * tmpbuf=strdup("[ ]"); // if we ever have more than 32 chars,
|
||||
// we need to rethink this
|
||||
@ -593,7 +593,7 @@ void logfunctions::fatal(const char *prefix, const char *fmt, va_list ap, int ex
|
||||
}
|
||||
#endif
|
||||
#if !BX_WITH_WX
|
||||
static char *divider = "========================================================================";
|
||||
static const char *divider = "========================================================================";
|
||||
fprintf(stderr, "%s\n", divider);
|
||||
fprintf(stderr, "Bochs is exiting with the following message:\n");
|
||||
fprintf(stderr, "%s ", prefix);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: main.cc,v 1.360 2007-10-21 22:07:31 sshwarts Exp $
|
||||
// $Id: main.cc,v 1.361 2007-10-24 23:28:11 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -79,7 +79,7 @@ void bx_init_hardware(void);
|
||||
void bx_init_options(void);
|
||||
void bx_init_bx_dbg(void);
|
||||
|
||||
static char *divider = "========================================================================";
|
||||
static const char *divider = "========================================================================";
|
||||
static logfunctions thePluginLog;
|
||||
logfunctions *pluginlog = &thePluginLog;
|
||||
|
||||
@ -264,7 +264,7 @@ int bxmain () {
|
||||
// read a param to decide which config interface to start.
|
||||
// If one exists, start it. If not, just begin.
|
||||
bx_param_enum_c *ci_param = SIM->get_param_enum(BXPN_SEL_CONFIG_INTERFACE);
|
||||
char *ci_name = ci_param->get_selected();
|
||||
const char *ci_name = ci_param->get_selected();
|
||||
if (!strcmp(ci_name, "textconfig")) {
|
||||
#if BX_USE_TEXTCONFIG
|
||||
init_text_config_interface(); // in textconfig.h
|
||||
@ -750,9 +750,9 @@ bx_bool load_and_init_display_lib()
|
||||
}
|
||||
BX_ASSERT(bx_gui == NULL);
|
||||
bx_param_enum_c *ci_param = SIM->get_param_enum(BXPN_SEL_CONFIG_INTERFACE);
|
||||
char *ci_name = ci_param->get_selected();
|
||||
const char *ci_name = ci_param->get_selected();
|
||||
bx_param_enum_c *gui_param = SIM->get_param_enum(BXPN_SEL_DISPLAY_LIBRARY);
|
||||
char *gui_name = gui_param->get_selected();
|
||||
const char *gui_name = gui_param->get_selected();
|
||||
if (!strcmp(ci_name, "wx")) {
|
||||
BX_ERROR(("change of the config interface to wx not implemented yet"));
|
||||
}
|
||||
@ -1166,7 +1166,10 @@ int bx_atexit(void)
|
||||
#if BX_DEBUGGER == 0
|
||||
if (SIM && SIM->get_init_done()) {
|
||||
for (int cpu=0; cpu<BX_SMP_PROCESSORS; cpu++)
|
||||
if (BX_CPU(cpu)) BX_CPU(cpu)->atexit();
|
||||
#if BX_SUPPORT_SMP
|
||||
if (BX_CPU(cpu))
|
||||
#endif
|
||||
BX_CPU(cpu)->atexit();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.cc,v 1.22 2007-09-28 19:51:42 sshwarts Exp $
|
||||
// $Id: plugin.cc,v 1.23 2007-10-24 23:28:40 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file defines the plugin and plugin-device registration functions and
|
||||
@ -488,7 +488,7 @@ plugin_startup(void)
|
||||
/* Plugin system: Device registration */
|
||||
/************************************************************************/
|
||||
|
||||
void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmodel_c *devmodel, char *name)
|
||||
void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmodel_c *devmodel, const char *name)
|
||||
{
|
||||
device_t *device;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: plugin.h,v 1.59 2007-09-28 19:51:43 sshwarts Exp $
|
||||
// $Id: plugin.h,v 1.60 2007-10-24 23:28:50 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This file provides macros and types needed for plugins. It is based on
|
||||
@ -266,7 +266,7 @@ typedef void (*deviceInitMem_t)(BX_MEM_C *);
|
||||
typedef void (*deviceInitDev_t)(void);
|
||||
typedef void (*deviceReset_t)(unsigned);
|
||||
|
||||
BOCHSAPI void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmodel_c *dev, char *name);
|
||||
BOCHSAPI void pluginRegisterDeviceDevmodel(plugin_t *plugin, plugintype_t type, bx_devmodel_c *dev, const char *name);
|
||||
BOCHSAPI bx_bool pluginDevicePresent(char *name);
|
||||
|
||||
/* === IO port stuff === */
|
||||
|
Loading…
x
Reference in New Issue
Block a user