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
1901 for (i = 0; i < nb_args; i++) {1901 for (i = 0; i < nb_args; i++) {
1902 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {1902 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
1903 ALWAYS_ASSERT(FALSE);1903 ALWAYS_ASSERT(FALSE);
1904 } else if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
1905 ALWAYS_ASSERT(FALSE);
1906 } else {1904 } else {
1907 /* simple type (currently always same size) */1905 /* simple type (currently always same size) */
1908 /* XXX: implicit cast ? */1906 /* 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
162 tcc_error("incompatible types for redefinition of '%s'",162 tcc_error("incompatible types for redefinition of '%s'",
163 get_tok_str(v, NULL));163 get_tok_str(v, NULL));
164 }164 }
165 s = *ps;
166 s = sym_malloc();165 s = sym_malloc();
167 s->asm_label = NULL;166 s->asm_label = NULL;
168 s->v = v;167 s->v = v;
tccpp.c+1−1
@@ -276,7 +276,7 @@ ST_FUNC char *get_tok_str(int v, CValue *cv) · 275 unmodified lines
276#ifdef _WIN32276#ifdef _WIN32
277 sprintf(p, "%u", (unsigned)cv->ull);277 sprintf(p, "%u", (unsigned)cv->ull);
278#else278#else
279 sprintf(p, "%Lu", cv->ull);279 sprintf(p, "%llu", cv->ull);
280#endif280#endif
281 break;281 break;
282 case TOK_LCHAR:282 case TOK_LCHAR:
x86_64-gen.c+1−1
@@ -501,7 +501,7 @@ void load(int r, SValue *sv) · 500 unmodified lines
501 o(0xc0 + REG_VALUE(v) + REG_VALUE(r)*8);501 o(0xc0 + REG_VALUE(v) + REG_VALUE(r)*8);
502 }502 }
503 } else if (r == TREG_ST0) {503 } else if (r == TREG_ST0) {
504 assert((v >= TREG_XMM0) || (v <= TREG_XMM7));504 assert((v >= TREG_XMM0) && (v <= TREG_XMM7));
505 /* gen_cvt_ftof(VT_LDOUBLE); */505 /* gen_cvt_ftof(VT_LDOUBLE); */
506 /* movsd %xmmN,-0x10(%rsp) */506 /* movsd %xmmN,-0x10(%rsp) */
507 o(0x110ff2);507 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