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
136136 static unsigned long stuff_const(unsigned long op,unsigned long c)
137137 {
138138 int try_neg=0;
139− unsigned long nc,negop;
139+ unsigned long nc = 0,negop = 0;
140+
140141 switch(op&0x1F00000)
141142 {
142143 case 0x800000: //add
@@ -901,8 +902,8 @@ int gtst(int inv, int t) · 758 unmodified lines
901902 /* generate an integer binary operation */
902903 void gen_opi(int op)
903904 {
904− int c, func;
905− unsigned long opc,r,fr;
905+ int c, func = 0;
906+ unsigned long opc = 0,r,fr;
906907
907908 c=0;
908909 switch(op) {
@@ -989,6 +990,7 @@ void gen_opi(int op) · 80 unmodified lines
989990 default:
990991 opc = 0x15;
991992 c=1;
993+ break;
992994 }
993995 switch(c) {
994996 case 1:
c67-gen.c+7−5
@@ -1551,7 +1551,7 @@ void C67_SHR(int r, int v) · 1550 unmodified lines
15511551 /* load 'r' from value 'sv' */
15521552 void load(int r, SValue * sv)
15531553 {
1554− int v, t, ft, fc, fr, size, element;
1554+ int v, t, ft, fc, fr, size = 0, element;
15551555 BOOL Unsigned = false;
15561556 SValue v1;
15571557
@@ -1873,7 +1873,7 @@ static void gcall_or_jmp(int is_jmp) · 315 unmodified lines
18731873 context. Stack entry is popped */
18741874 void gfunc_call(int nb_args)
18751875 {
1876− int i, r, size;
1876+ int i, r, size = 0;
18771877 int args_sizes[NoCallArgsPassedOnStack];
18781878
18791879 if (nb_args > NoCallArgsPassedOnStack) {
@@ -2518,12 +2518,14 @@ void gen_cvt_ftof(int t) · 638 unmodified lines
25182518
25192519 r = vtop->r;
25202520
2521− if (r == TREG_EAX) // make sure the paired reg is avail
2521+ if (r == TREG_EAX) { // make sure the paired reg is avail
25222522 r2 = get_reg(RC_ECX);
2523− else if (r == TREG_EDX)
2523+ } else if (r == TREG_EDX) {
25242524 r2 = get_reg(RC_ST0);
2525− else
2525+ } else {
25262526 ALWAYS_ASSERT(FALSE);
2527+ r2 = 0; /* avoid warning */
2528+ }
25272529
25282530 C67_SPDP(r, r); // convert it to DP same register
25292531 C67_NOP(1);
tccelf.c+6−1
@@ -448,9 +448,12 @@ static void relocate_section(TCCState *s1, Section *s) · 447 unmodified lines
448448 Section *sr;
449449 Elf32_Rel *rel, *rel_end, *qrel;
450450 Elf32_Sym *sym;
451− int type, sym_index, esym_index;
451+ int type, sym_index;
452452 unsigned char *ptr;
453453 unsigned long val, addr;
454+#if defined(TCC_TARGET_I386)
455+ int esym_index;
456+#endif
454457
455458 sr = s->reloc;
456459 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
662665 p[3] = val >> 24;
663666 }
664667
668+#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_ARM)
665669 static uint32_t get32(unsigned char *p)
666670 {
667671 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
668672 }
673+#endif
669674
670675 static void build_got(TCCState *s1)
671676 {

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