History

Fix various errors uncovered by static analysis

Thomas Preud'homme committed 12 years ago

Commit fdb3b101 parent ba286134 files · +2 −5Browse files

Unified · Split

4 files
  1. c67-gen.c +0 −2
  2. tccgen.c +0 −1
  3. tccpp.c +1 −1
  4. x86_64-gen.c +1 −1
c67-gen.c+0−2
@@ -1901,8 +1901,6 @@ void gfunc_call(int nb_args) · 1900 unmodified lines
19011901 for (i = 0; i < nb_args; i++) {
19021902 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
19031903 ALWAYS_ASSERT(FALSE);
1904− } else if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
1905− ALWAYS_ASSERT(FALSE);
19061904 } else {
19071905 /* simple type (currently always same size) */
19081906 /* XXX: implicit cast ? */
tccgen.c+0−1
@@ -162,7 +162,6 @@ ST_FUNC Sym *sym_push2(Sym **ps, int v, int t, long c) · 161 unmodified lines
162162 tcc_error("incompatible types for redefinition of '%s'",
163163 get_tok_str(v, NULL));
164164 }
165− s = *ps;
166165 s = sym_malloc();
167166 s->asm_label = NULL;
168167 s->v = v;
tccpp.c+1−1
@@ -276,7 +276,7 @@ ST_FUNC char *get_tok_str(int v, CValue *cv) · 275 unmodified lines
276276 #ifdef _WIN32
277277 sprintf(p, "%u", (unsigned)cv->ull);
278278 #else
279− sprintf(p, "%Lu", cv->ull);
279+ sprintf(p, "%llu", cv->ull);
280280 #endif
281281 break;
282282 case TOK_LCHAR:
x86_64-gen.c+1−1
@@ -501,7 +501,7 @@ void load(int r, SValue *sv) · 500 unmodified lines
501501 o(0xc0 + REG_VALUE(v) + REG_VALUE(r)*8);
502502 }
503503 } else if (r == TREG_ST0) {
504− assert((v >= TREG_XMM0) || (v <= TREG_XMM7));
504+ assert((v >= TREG_XMM0) && (v <= TREG_XMM7));
505505 /* gen_cvt_ftof(VT_LDOUBLE); */
506506 /* movsd %xmmN,-0x10(%rsp) */
507507 o(0x110ff2);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t