Read about our upcoming Code of Conduct on this issue

Commit 34e34932 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: fixed shift warnings in eos.c

(found with UBSan)

--HG--
branch : qemu
parent 338e9f2e6d34
......@@ -1979,7 +1979,7 @@ unsigned int eos_handle_intengine_vx ( unsigned int parm, EOSState *s, unsigned
for (int i = 0; i < 32; i++)
{
if (value & (1<<i))
if (value & (1u << i))
{
msg_arg2 = ((address & 0xF0) >> 1) + i;
if (msg_arg2 < COUNT(s->irq_enabled))
......@@ -1999,7 +1999,7 @@ unsigned int eos_handle_intengine_vx ( unsigned int parm, EOSState *s, unsigned
for (int i = 0; i < 32; i++)
{
if (value & (1<<i))
if (value & (1u << i))
{
msg_arg2 = ((address & 0xF0) >> 1) + i;
if (msg_arg2 < COUNT(s->irq_enabled))
......@@ -4701,7 +4701,7 @@ static char* format_clock_enable(int value)
int i;
for (i = 0; i < 32; i++)
{
if (value & (1 << i))
if (value & (1u << i))
{
STR_APPEND(clock_msg, "%s ", clock_modules[i]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment