History

Fix clang warnings

herman ten brugge committed 5 years ago

Commit cf10c1d1 parent 85b6efb1 file · +5 −2Browse files

Unified · Split

tccelf.c+5−2
@@ -2474,7 +2474,7 @@ static Section *create_bsd_note_section(TCCState *s1, · 2473 unmodified lines
24742474 Section *s = find_section (s1, name);
24752475
24762476 if (s->data_offset == 0) {
2477− unsigned char *ptr = section_ptr_add(s, sizeof(ElfW(Nhdr)) + 8 + 4);
2477+ char *ptr = section_ptr_add(s, sizeof(ElfW(Nhdr)) + 8 + 4);
24782478 ElfW(Nhdr) *note = (ElfW(Nhdr) *) ptr;
24792479
24802480 s->sh_type = SHT_NOTE;
@@ -2493,7 +2493,10 @@ static int elf_output_file(TCCState *s1, const char *filename) · 12 unmodified lines
24932493 {
24942494 int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order;
24952495 struct dyn_inf dyninf = {0};
2496− struct ro_inf roinf, *roinf_use = NULL;
2496+ struct ro_inf roinf;
2497+#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
2498+ struct ro_inf *roinf_use = NULL;
2499+#endif
24972500 ElfW(Phdr) *phdr;
24982501 Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;
24992502

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