History

fix warnings with tcc_add/get_symbol

grischka committed 17 years ago

Commit 40f5ce01 parent 67aebdd2 files · +2 −2Browse files

Unified · Split

2 files
  1. tcccoff.c +1 −1
  2. tccelf.c +1 −1
tcccoff.c+1−1
@@ -940,7 +940,7 @@ int tcc_load_coff(TCCState * s1, int fd) · 939 unmodified lines
940940 if (name[0] == '_' && strcmp(name, "_main") != 0)
941941 name++;
942942
943− tcc_add_symbol(s1, name, csym.n_value);
943+ tcc_add_symbol(s1, name, (void*)csym.n_value);
944944 }
945945 // skip any aux records
946946
tccelf.c+1−1
@@ -177,7 +177,7 @@ void *tcc_get_symbol(TCCState *s, const char *name) · 176 unmodified lines
177177 if (!sym_index)
178178 return NULL;
179179 sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];
180− return (void*)sym->st_value;
180+ return (void*)(long)sym->st_value;
181181 }
182182
183183 void *tcc_get_symbol_err(TCCState *s, const char *name)

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