mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Fix signed-unsigned comparisons and mark warning as error (part 2).
This commit is contained in:
parent
771eff273b
commit
92e3eaf3ff
68 changed files with 194 additions and 202 deletions
|
|
@ -77,7 +77,7 @@ error_code sys_lwcond_signal(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond)
|
|||
|
||||
lwmutex->all_info--;
|
||||
|
||||
if (res != CELL_EPERM)
|
||||
if (res + 0u != CELL_EPERM)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ error_code sys_lwcond_signal(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond)
|
|||
{
|
||||
// if locking failed
|
||||
|
||||
if (res != CELL_EBUSY)
|
||||
if (res + 0u != CELL_EBUSY)
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ error_code sys_lwcond_signal(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond)
|
|||
// unlock the lightweight mutex
|
||||
sys_lwmutex_unlock(ppu, lwmutex);
|
||||
|
||||
if (res != CELL_ENOENT)
|
||||
if (res + 0u != CELL_ENOENT)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ error_code sys_lwcond_signal_all(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond)
|
|||
{
|
||||
// if locking failed
|
||||
|
||||
if (res != CELL_EBUSY)
|
||||
if (res + 0u != CELL_EBUSY)
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
|
@ -235,7 +235,7 @@ error_code sys_lwcond_signal_to(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u
|
|||
{
|
||||
// if locking failed
|
||||
|
||||
if (res != CELL_EBUSY)
|
||||
if (res + 0u != CELL_EBUSY)
|
||||
{
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
|
@ -300,7 +300,7 @@ error_code sys_lwcond_wait(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u64 ti
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (res == CELL_OK || res == CELL_ESRCH)
|
||||
if (res == CELL_OK || res + 0u == CELL_ESRCH)
|
||||
{
|
||||
if (res == CELL_OK)
|
||||
{
|
||||
|
|
@ -319,7 +319,7 @@ error_code sys_lwcond_wait(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u64 ti
|
|||
return res;
|
||||
}
|
||||
|
||||
if (res == CELL_EBUSY || res == CELL_ETIMEDOUT)
|
||||
if (res + 0u == CELL_EBUSY || res + 0u == CELL_ETIMEDOUT)
|
||||
{
|
||||
if (error_code res2 = sys_lwmutex_lock(ppu, lwmutex, 0))
|
||||
{
|
||||
|
|
@ -329,7 +329,7 @@ error_code sys_lwcond_wait(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u64 ti
|
|||
// if successfully locked, restore recursive value
|
||||
lwmutex->recursive_count = recursive_value;
|
||||
|
||||
if (res == CELL_EBUSY)
|
||||
if (res + 0u == CELL_EBUSY)
|
||||
{
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
@ -337,7 +337,7 @@ error_code sys_lwcond_wait(ppu_thread& ppu, vm::ptr<sys_lwcond_t> lwcond, u64 ti
|
|||
return res;
|
||||
}
|
||||
|
||||
if (res == CELL_EDEADLK)
|
||||
if (res + 0u == CELL_EDEADLK)
|
||||
{
|
||||
// restore owner and recursive value
|
||||
const auto old = lwmutex->vars.owner.exchange(tid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue