History

update clang warning

herman ten brugge committed 5 years ago

Commit 9d498831 parent ea82d081 file · +4 −7Browse files

Unified · Split

tccelf.c+4−7
@@ -2501,10 +2501,7 @@ static int elf_output_file(TCCState *s1, const char *filename) · 2500 unmodified lines
2501{2501{
2502 int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order;2502 int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order;
2503 struct dyn_inf dyninf = {0};2503 struct dyn_inf dyninf = {0};
2504 struct ro_inf roinf;2504 struct ro_inf roinf, *roinf_use = &roinf;
2505#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
2506 struct ro_inf *roinf_use = NULL;
2507#endif
2508 ElfW(Phdr) *phdr;2505 ElfW(Phdr) *phdr;
2509 Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;2506 Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;
2510 2507
@@ -2640,11 +2637,11 @@ static int elf_output_file(TCCState *s1, const char *filename) · 129 unmodified lines
2640 2637
2641#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)2638#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
2642 /* GNU_RELRO */2639 /* GNU_RELRO */
2643 if (file_type != TCC_OUTPUT_OBJ) {2640 if (file_type != TCC_OUTPUT_OBJ)
2644 phnum++;2641 phnum++;
2645 roinf_use = &roinf;2642 else
2646 }
2647#endif2643#endif
2644 roinf_use = NULL;
2648 2645
2649 /* allocate program segment headers */2646 /* allocate program segment headers */
2650 phdr = tcc_mallocz(phnum * sizeof(ElfW(Phdr)));2647 phdr = tcc_mallocz(phnum * sizeof(ElfW(Phdr)));

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