mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-11 15:40:51 +00:00
CppCheck: Tried to classify and marked some lines that weird.
This commit is contained in:
parent
cd23a2ecaf
commit
900389d857
@ -140,6 +140,7 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
|
|||||||
unsigned int range = 0xFFFFFFFF;
|
unsigned int range = 0xFFFFFFFF;
|
||||||
unsigned int code = (in[1] << 24) | (in[2] << 16) | (in[3] << 8) | in[4];
|
unsigned int code = (in[1] << 24) | (in[2] << 16) | (in[3] << 8) | in[4];
|
||||||
|
|
||||||
|
// TODO:: Syphurith: There was a check against the unsigned char head. if (head < 0) would always be false.. I don't know are you tried to if (head > 0x80)?
|
||||||
if (head < 0) // Check if we have a valid starting byte.
|
if (head < 0) // Check if we have a valid starting byte.
|
||||||
{
|
{
|
||||||
// The dictionary header is invalid, the data is not compressed.
|
// The dictionary header is invalid, the data is not compressed.
|
||||||
|
@ -233,6 +233,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
|
|||||||
size_t fill;
|
size_t fill;
|
||||||
uint32_t left;
|
uint32_t left;
|
||||||
|
|
||||||
|
// TODO:: Syphurith: Orz. It is said that size_t is an unsigned type..
|
||||||
if( ilen <= 0 )
|
if( ilen <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ std::string armv7_fmt(ARMv7Context& context, vm::psv::ptr<const char> fmt, u32 g
|
|||||||
const auto start = fmt - 1;
|
const auto start = fmt - 1;
|
||||||
|
|
||||||
// read flags
|
// read flags
|
||||||
|
// TODO:: Syphurith: Sorry i can not classify/understand these lines exactly..
|
||||||
const bool plus_sign = *fmt == '+' ? fmt++, true : false;
|
const bool plus_sign = *fmt == '+' ? fmt++, true : false;
|
||||||
const bool minus_sign = *fmt == '-' ? fmt++, true : false;
|
const bool minus_sign = *fmt == '-' ? fmt++, true : false;
|
||||||
const bool space_sign = *fmt == ' ' ? fmt++, true : false;
|
const bool space_sign = *fmt == ' ' ? fmt++, true : false;
|
||||||
|
@ -258,6 +258,7 @@ public:
|
|||||||
|
|
||||||
sync_var.atomic_op([&out_result, &out_value, &out_count, last_value](sync_var_t& data)
|
sync_var.atomic_op([&out_result, &out_value, &out_count, last_value](sync_var_t& data)
|
||||||
{
|
{
|
||||||
|
// TODO:: Syphurith: I don't know what you tried to express, exactly.
|
||||||
if ((out_result = data.count != 0))
|
if ((out_result = data.count != 0))
|
||||||
{
|
{
|
||||||
out_value = data.value0;
|
out_value = data.value0;
|
||||||
|
@ -196,6 +196,7 @@ next:
|
|||||||
|
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
// TODO:: Syphurith: I don't know whether we should keep this else-if now. Since the if condition is same with this one.
|
||||||
else if (adec.reader.size < (u32)buf_size)
|
else if (adec.reader.size < (u32)buf_size)
|
||||||
{
|
{
|
||||||
buf_size = adec.reader.size;
|
buf_size = adec.reader.size;
|
||||||
|
@ -168,6 +168,7 @@ next:
|
|||||||
|
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
// TODO:: Syphurith: Orz. The if condition above is same with this one, so this would not be executed.
|
||||||
else if (vdec.reader.size < (u32)buf_size)
|
else if (vdec.reader.size < (u32)buf_size)
|
||||||
{
|
{
|
||||||
buf_size = vdec.reader.size;
|
buf_size = vdec.reader.size;
|
||||||
|
@ -508,7 +508,7 @@ s32 sys_spu_thread_group_terminate(u32 id, s32 value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group->state <= SPU_THREAD_GROUP_STATUS_INITIALIZED || group->state == SPU_THREAD_GROUP_STATUS_WAITING || group->state == SPU_THREAD_GROUP_STATUS_WAITING)
|
if ((group->state <= SPU_THREAD_GROUP_STATUS_INITIALIZED) || (group->state == SPU_THREAD_GROUP_STATUS_WAITING) || (group->state == SPU_THREAD_GROUP_STATUS_WAITING))
|
||||||
{
|
{
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user