summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/vhdx.c3
-rw-r--r--hw/9pfs/virtio-9p-local-maru.c5
-rw-r--r--hw/i386/pc.c3
-rw-r--r--hw/net/eepro100.c4
-rw-r--r--hw/net/ne2000-isa.c1
-rw-r--r--slirp/slirp.c2
-rw-r--r--target-i386/translate.c8
-rw-r--r--tizen/src/hw/maru_board.c4
-rw-r--r--util/qemu-sockets.c3
9 files changed, 8 insertions, 25 deletions
diff --git a/block/vhdx.c b/block/vhdx.c
index 509baaf484..14ba8b23e7 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -99,7 +99,8 @@ static const MSGUID logical_sector_guid = { .data1 = 0x8141bf1d,
/* Each parent type must have a valid GUID; this is for parent images
* of type 'VHDX'. If we were to allow e.g. a QCOW2 parent, we would
* need to make up our own QCOW2 GUID type */
-static const MSGUID parent_vhdx_guid = { .data1 = 0xb04aefb7,
+static const MSGUID parent_vhdx_guid __attribute__((unused))
+ = { .data1 = 0xb04aefb7,
.data2 = 0xd19e,
.data3 = 0x4a81,
.data4 = { 0xb7, 0x89, 0x25, 0xb8,
diff --git a/hw/9pfs/virtio-9p-local-maru.c b/hw/9pfs/virtio-9p-local-maru.c
index 6b001041be..21406a0990 100644
--- a/hw/9pfs/virtio-9p-local-maru.c
+++ b/hw/9pfs/virtio-9p-local-maru.c
@@ -334,9 +334,8 @@ update_map_file:
if (credp->fc_gid != -1) {
gid = credp->fc_gid;
}
-// FIXME
#ifndef CONFIG_WIN32
- if (credp->fc_mode != -1) {
+ if (credp->fc_mode != (mode_t)-1) {
mode = credp->fc_mode;
}
#else
@@ -420,7 +419,7 @@ static int local_set_xattr(const char *path, FsCred *credp)
return err;
}
}
- if (credp->fc_mode != -1) {
+ if (credp->fc_mode != (mode_t)-1) {
err = setxattr(path, "user.virtfs.mode", &credp->fc_mode,
sizeof(mode_t), 0, 0);
if (err) {
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 612bde2f2c..d6628d7f60 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -905,9 +905,6 @@ static const int ne2000_io[NE2000_NB_MAX] = { 0x300, 0x320, 0x340, 0x360,
0x280, 0x380 };
static const int ne2000_irq[NE2000_NB_MAX] = { 9, 10, 11, 3, 4, 5 };
-static const int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc };
-static const int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 };
-
void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd)
{
static int nb_ne2k = 0;
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index 3b891ca340..9c70cce2a8 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -1217,7 +1217,6 @@ static void eepro100_write_mdi(EEPRO100State *s)
break;
case 1: /* Status Register */
missing("not writable");
- data = s->mdimem[reg];
break;
case 2: /* PHY Identification Register (Word 1) */
case 3: /* PHY Identification Register (Word 2) */
@@ -1230,7 +1229,8 @@ static void eepro100_write_mdi(EEPRO100State *s)
default:
missing("not implemented");
}
- s->mdimem[reg] = data;
+ s->mdimem[reg] &= eepro100_mdi_mask[reg];
+ s->mdimem[reg] |= data & ~eepro100_mdi_mask[reg];
} else if (opcode == 2) {
/* MDI read */
switch (reg) {
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
index c660e58335..0a14f6d1cd 100644
--- a/hw/net/ne2000-isa.c
+++ b/hw/net/ne2000-isa.c
@@ -98,6 +98,7 @@ static void isa_ne2000_class_initfn(ObjectClass *klass, void *data)
dc->realize = isa_ne2000_realizefn;
dc->props = ne2000_isa_properties;
+ dc->vmsd = &vmstate_isa_ne2000;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
}
diff --git a/slirp/slirp.c b/slirp/slirp.c
index bad8dad02e..4f50c2b647 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -37,8 +37,6 @@ static const uint8_t special_ethaddr[ETH_ALEN] = {
0x52, 0x55, 0x00, 0x00, 0x00, 0x00
};
-static const uint8_t zero_ethaddr[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
-
u_int curtime;
static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances =
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 9cc8922bde..abb97d1033 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -1507,14 +1507,6 @@ static void gen_shift_rm_im(DisasContext *s, TCGMemOp ot, int op1, int op2,
}
}
-static inline void tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2)
-{
- if (arg2 >= 0)
- tcg_gen_shli_tl(ret, arg1, arg2);
- else
- tcg_gen_shri_tl(ret, arg1, -arg2);
-}
-
static void gen_rot_rm_T1(DisasContext *s, TCGMemOp ot, int op1, int is_right)
{
target_ulong mask = (ot == MO_64 ? 0x3f : 0x1f);
diff --git a/tizen/src/hw/maru_board.c b/tizen/src/hw/maru_board.c
index e0feeb0855..2dd6de9cd4 100644
--- a/tizen/src/hw/maru_board.c
+++ b/tizen/src/hw/maru_board.c
@@ -46,10 +46,6 @@
#define MAX_IDE_BUS 2
-static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
-static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
-static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
-
/* maru specialized device init */
static void maru_device_init(void)
{
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 43e48cab1e..18991c10a4 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -30,8 +30,6 @@
# define AI_ADDRCONFIG 0
#endif
-static const int on=1, off=0;
-
/* used temporarily until all users are converted to QemuOpts */
QemuOptsList socket_optslist = {
.name = "socket",
@@ -159,6 +157,7 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
#ifdef IPV6_V6ONLY
if (e->ai_family == PF_INET6) {
/* listen on both ipv4 and ipv6 */
+ const int off = 0;
qemu_setsockopt(slisten, IPPROTO_IPV6, IPV6_V6ONLY, &off,
sizeof(off));
}