History

removed warnings

bellard committed 22 years ago

Commit 6bbfb8f1 parent 1d0e5e83 files · +18 −9Browse files

Unified · Split

3 files
  1. arm-gen.c +5 −3
  2. c67-gen.c +7 −5
  3. tccelf.c +6 −1
arm-gen.c+5−3
@@ -136,7 +136,8 @@ void o(unsigned long i) · 135 unmodified lines
136static unsigned long stuff_const(unsigned long op,unsigned long c)136static unsigned long stuff_const(unsigned long op,unsigned long c)
137{137{
138 int try_neg=0;138 int try_neg=0;
139 unsigned long nc,negop;139 unsigned long nc = 0,negop = 0;
140
140 switch(op&0x1F00000)141 switch(op&0x1F00000)
141 {142 {
142 case 0x800000: //add143 case 0x800000: //add
@@ -901,8 +902,8 @@ int gtst(int inv, int t) · 758 unmodified lines
901/* generate an integer binary operation */902/* generate an integer binary operation */
902void gen_opi(int op)903void gen_opi(int op)
903{904{
904 int c, func;905 int c, func = 0;
905 unsigned long opc,r,fr;906 unsigned long opc = 0,r,fr;
906 907
907 c=0;908 c=0;
908 switch(op) {909 switch(op) {
@@ -989,6 +990,7 @@ void gen_opi(int op) · 80 unmodified lines
989 default:990 default:
990 opc = 0x15;991 opc = 0x15;
991 c=1;992 c=1;
993 break;
992 }994 }
993 switch(c) {995 switch(c) {
994 case 1:996 case 1:
c67-gen.c+7−5
@@ -1551,7 +1551,7 @@ void C67_SHR(int r, int v) · 1550 unmodified lines
1551/* load 'r' from value 'sv' */1551/* load 'r' from value 'sv' */
1552void load(int r, SValue * sv)1552void load(int r, SValue * sv)
1553{1553{
1554 int v, t, ft, fc, fr, size, element;1554 int v, t, ft, fc, fr, size = 0, element;
1555 BOOL Unsigned = false;1555 BOOL Unsigned = false;
1556 SValue v1;1556 SValue v1;
1557 1557
@@ -1873,7 +1873,7 @@ static void gcall_or_jmp(int is_jmp) · 315 unmodified lines
1873 context. Stack entry is popped */1873 context. Stack entry is popped */
1874void gfunc_call(int nb_args)1874void gfunc_call(int nb_args)
1875{1875{
1876 int i, r, size;1876 int i, r, size = 0;
1877 int args_sizes[NoCallArgsPassedOnStack];1877 int args_sizes[NoCallArgsPassedOnStack];
1878 1878
1879 if (nb_args > NoCallArgsPassedOnStack) {1879 if (nb_args > NoCallArgsPassedOnStack) {
@@ -2518,12 +2518,14 @@ void gen_cvt_ftof(int t) · 638 unmodified lines
2518 2518
2519 r = vtop->r;2519 r = vtop->r;
2520 2520
2521 if (r == TREG_EAX) // make sure the paired reg is avail2521 if (r == TREG_EAX) { // make sure the paired reg is avail
2522 r2 = get_reg(RC_ECX);2522 r2 = get_reg(RC_ECX);
2523 else if (r == TREG_EDX)2523 } else if (r == TREG_EDX) {
2524 r2 = get_reg(RC_ST0);2524 r2 = get_reg(RC_ST0);
2525 else2525 } else {
2526 ALWAYS_ASSERT(FALSE);2526 ALWAYS_ASSERT(FALSE);
2527 r2 = 0; /* avoid warning */
2528 }
2527 2529
2528 C67_SPDP(r, r); // convert it to DP same register2530 C67_SPDP(r, r); // convert it to DP same register
2529 C67_NOP(1);2531 C67_NOP(1);
tccelf.c+6−1
@@ -448,9 +448,12 @@ static void relocate_section(TCCState *s1, Section *s) · 447 unmodified lines
448 Section *sr;448 Section *sr;
449 Elf32_Rel *rel, *rel_end, *qrel;449 Elf32_Rel *rel, *rel_end, *qrel;
450 Elf32_Sym *sym;450 Elf32_Sym *sym;
451 int type, sym_index, esym_index;451 int type, sym_index;
452 unsigned char *ptr;452 unsigned char *ptr;
453 unsigned long val, addr;453 unsigned long val, addr;
454#if defined(TCC_TARGET_I386)
455 int esym_index;
456#endif
454 457
455 sr = s->reloc;458 sr = s->reloc;
456 rel_end = (Elf32_Rel *)(sr->data + sr->data_offset);459 rel_end = (Elf32_Rel *)(sr->data + sr->data_offset);
@@ -662,10 +665,12 @@ static void put32(unsigned char *p, uint32_t val) · 205 unmodified lines
662 p[3] = val >> 24;665 p[3] = val >> 24;
663}666}
664 667
668#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_ARM)
665static uint32_t get32(unsigned char *p)669static uint32_t get32(unsigned char *p)
666{670{
667 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);671 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
668}672}
673#endif
669 674
670static void build_got(TCCState *s1)675static void build_got(TCCState *s1)
671{676{

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