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
940 if (name[0] == '_' && strcmp(name, "_main") != 0)940 if (name[0] == '_' && strcmp(name, "_main") != 0)
941 name++;941 name++;
942 942
943 tcc_add_symbol(s1, name, csym.n_value);943 tcc_add_symbol(s1, name, (void*)csym.n_value);
944 }944 }
945 // skip any aux records945 // skip any aux records
946 946
tccelf.c+1−1
@@ -177,7 +177,7 @@ void *tcc_get_symbol(TCCState *s, const char *name) · 176 unmodified lines
177 if (!sym_index)177 if (!sym_index)
178 return NULL;178 return NULL;
179 sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];179 sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];
180 return (void*)sym->st_value;180 return (void*)(long)sym->st_value;
181}181}
182 182
183void *tcc_get_symbol_err(TCCState *s, const char *name)183void *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