Fixed a GCC warning and some MSVC warnings.
This commit is contained in:
parent
3209b04d82
commit
27c120154b
@ -501,11 +501,11 @@ typedef Bit32u bx_phy_address;
|
||||
#define BX_MAX_BIT64U ( (Bit64u) -1 )
|
||||
#define BX_MIN_BIT64U ( 0 )
|
||||
#define BX_MAX_BIT64S ( ((Bit64u) -1) >> 1 )
|
||||
#define BX_MIN_BIT64S ( (Bit64s)-(((Bit64u) -1) >> 1) - 1)
|
||||
#define BX_MIN_BIT64S ( (Bit64s)(1ULL << 63) )
|
||||
#define BX_MAX_BIT32U ( (Bit32u) -1 )
|
||||
#define BX_MIN_BIT32U ( 0 )
|
||||
#define BX_MAX_BIT32S ( ((Bit32u) -1) >> 1 )
|
||||
#define BX_MIN_BIT32S ( (Bit32s)-(((Bit32u) -1) >> 1) - 1)
|
||||
#define BX_MIN_BIT32S ( (Bit32s)(1U << 31) )
|
||||
#define BX_MAX_BIT16U ( (Bit16u) -1 )
|
||||
#define BX_MIN_BIT16U ( 0 )
|
||||
#define BX_MAX_BIT16S ( ((Bit16u) -1) >> 1 )
|
||||
|
@ -5,7 +5,7 @@
|
||||
* QEMU compatibility functions
|
||||
*
|
||||
* Copyright (c) 2003-2008 Fabrice Bellard
|
||||
* Copyright (C) 2014-2020 The Bochs Project
|
||||
* Copyright (C) 2014-2021 The Bochs Project
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -69,7 +69,15 @@ void qemu_set_nonblock(int fd)
|
||||
#ifndef HAVE_INET_ATON
|
||||
int inet_aton(const char *cp, struct in_addr *ia)
|
||||
{
|
||||
uint32_t addr = inet_addr(cp);
|
||||
uint32_t addr;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
if (!inet_pton(AF_INET, cp, &addr)) {
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
addr = inet_addr(cp);
|
||||
#endif
|
||||
if (addr == 0xffffffff) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -1116,7 +1116,7 @@ plugin_t bx_builtin_plugins[] = {
|
||||
BUILTIN_IMG_PLUGIN_ENTRY(vbox),
|
||||
BUILTIN_IMG_PLUGIN_ENTRY(vpc),
|
||||
BUILTIN_IMG_PLUGIN_ENTRY(vvfat),
|
||||
{"NULL", PLUGTYPE_GUI, NULL, 0}
|
||||
{"NULL", PLUGTYPE_GUI, 0, NULL, 0}
|
||||
};
|
||||
|
||||
Bit8u bx_get_plugins_count_np(Bit16u type)
|
||||
|
Loading…
Reference in New Issue
Block a user