update clang warning
This commit is contained in:
parent
ea82d0826d
commit
9d49883895
1 changed files with 4 additions and 7 deletions
11
tccelf.c
11
tccelf.c
|
@ -2501,10 +2501,7 @@ static int elf_output_file(TCCState *s1, const char *filename)
|
||||||
{
|
{
|
||||||
int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order;
|
int i, ret, phnum, phfill, shnum, file_type, file_offset, *sec_order;
|
||||||
struct dyn_inf dyninf = {0};
|
struct dyn_inf dyninf = {0};
|
||||||
struct ro_inf roinf;
|
struct ro_inf roinf, *roinf_use = &roinf;
|
||||||
#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
|
|
||||||
struct ro_inf *roinf_use = NULL;
|
|
||||||
#endif
|
|
||||||
ElfW(Phdr) *phdr;
|
ElfW(Phdr) *phdr;
|
||||||
Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;
|
Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;
|
||||||
|
|
||||||
|
@ -2640,11 +2637,11 @@ static int elf_output_file(TCCState *s1, const char *filename)
|
||||||
|
|
||||||
#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
|
#if !TARGETOS_FreeBSD && !TARGETOS_NetBSD && !defined(__APPLE__) && !defined(_WIN32)
|
||||||
/* GNU_RELRO */
|
/* GNU_RELRO */
|
||||||
if (file_type != TCC_OUTPUT_OBJ) {
|
if (file_type != TCC_OUTPUT_OBJ)
|
||||||
phnum++;
|
phnum++;
|
||||||
roinf_use = &roinf;
|
else
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
roinf_use = NULL;
|
||||||
|
|
||||||
/* allocate program segment headers */
|
/* allocate program segment headers */
|
||||||
phdr = tcc_mallocz(phnum * sizeof(ElfW(Phdr)));
|
phdr = tcc_mallocz(phnum * sizeof(ElfW(Phdr)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue