@@ -61,7 +61,7 @@ void Machine::setup_linux_system_calls()
61
61
regs.rsi , regs.rdx );
62
62
63
63
regs.rax = readv (fd, (struct iovec *)&buffers[0 ], bufcount);
64
- if (regs.rax < 0 )
64
+ if (int ( regs.rax ) < 0 )
65
65
regs.rax = -errno;
66
66
cpu.set_registers (regs);
67
67
});
@@ -178,7 +178,7 @@ void Machine::setup_linux_system_calls()
178
178
fd = cpu.machine ().fds ().translate (regs.rdi );
179
179
}
180
180
regs.rax = lseek (fd, regs.rsi , regs.rdx );
181
- if (regs.rax < 0 ) {
181
+ if (int ( regs.rax ) < 0 ) {
182
182
regs.rax = -errno;
183
183
}
184
184
} catch (...) {
@@ -464,7 +464,7 @@ void Machine::setup_linux_system_calls()
464
464
auto & regs = cpu.registers ();
465
465
switch (regs.rsi ) {
466
466
case 0x5401 : /* TCGETS */
467
- if (regs.rdi >= 0 && regs.rdi < 3 )
467
+ if (int ( regs.rdi ) >= 0 && int ( regs.rdi ) < 3 )
468
468
regs.rax = 0 ;
469
469
else
470
470
regs.rax = -EPERM;
@@ -725,7 +725,7 @@ void Machine::setup_linux_system_calls()
725
725
try {
726
726
const int fd = cpu.machine ().fds ().translate (regs.rdi );
727
727
regs.rax = ::shutdown (fd, regs.rsi );
728
- if (regs.rax < 0 )
728
+ if (int ( regs.rax ) < 0 )
729
729
regs.rax = -errno;
730
730
} catch (...) {
731
731
regs.rax = -EBADF;
@@ -801,7 +801,7 @@ void Machine::setup_linux_system_calls()
801
801
auto & regs = cpu.registers ();
802
802
struct timeval tv;
803
803
regs.rax = gettimeofday (&tv, nullptr );
804
- if (regs.rax < 0 )
804
+ if (int ( regs.rax ) < 0 )
805
805
{
806
806
regs.rax = -errno;
807
807
}
@@ -915,7 +915,7 @@ void Machine::setup_linux_system_calls()
915
915
auto & regs = cpu.registers ();
916
916
struct timespec ts;
917
917
regs.rax = clock_gettime (CLOCK_MONOTONIC, &ts);
918
- if (regs.rax < 0 )
918
+ if (int ( regs.rax ) < 0 )
919
919
regs.rax = -errno;
920
920
else
921
921
cpu.machine ().copy_to_guest (regs.rsi , &ts, sizeof (ts));
0 commit comments