Hello. I check the tiny c project with cppcheck, and i found this next:
tiny_impdef.c line 228
p = tcc_realloc(p, n0 = n0 ? n0 * 2 : 256);
maybe should be:
p = tcc_realloc(p, n0 ? n0 * 2 : 256);
x86_64-gen.c line 504
assert((v >= TREG_XMM0) || (v <= TREG_XMM7));
maybe should be:
assert((v >= TREG_XMM0) && (v <= TREG_XMM7));
tccgen.c line 2272
if (t & (VT_DEFSIGN | VT_UNSIGNED))
maybe should be:
if (t & VT_UNSIGNED)
tccgen.c line 165
s = *ps;
maybe should be:
//s = *ps; because is assigned in next line
tccpp.c line 2917
assign address of local variable to a function parameter (i not understand this), but for case
tccpp.c line 279
sprintf(p, "%Lu", cv->ull);
maybe should be: //the mask is unsigned long but the value is unsigned long long
sprintf(p, "%llu", cv->ull);
or
sprintf(p, "%Lu", (unsigned long)cv->ull);
c67-gen.c lines 1904 and 1905 are unncesseary because are the same condition that lines 1902 and 1903