mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Cleanup warnings when accessing static fields.
This commit is contained in:
parent
2557996a9d
commit
b768d4a16c
3 changed files with 13 additions and 13 deletions
|
@ -448,7 +448,7 @@ public class Coff {
|
|||
public SectionHeader[] getSectionHeaders() throws IOException {
|
||||
if (scnhdrs == null) {
|
||||
scnhdrs = new SectionHeader[getFileHeader().f_nscns];
|
||||
long sec = getFileHeader().FILHSZ + getFileHeader().f_opthdr;
|
||||
long sec = FileHeader.FILHSZ + getFileHeader().f_opthdr;
|
||||
for (int i = 0; i < scnhdrs.length; i++, sec += SectionHeader.SCNHSZ) {
|
||||
scnhdrs[i] = new SectionHeader(rfile, sec);
|
||||
}
|
||||
|
|
|
@ -403,11 +403,11 @@ public class PE {
|
|||
|
||||
/* PE characteristics, FileHeader.f_flags. */
|
||||
if ((filhdr.f_flags & PEConstants.IMAGE_FILE_DLL) != 0) {
|
||||
attrib.type = attrib.PE_TYPE_SHLIB;
|
||||
attrib.type = Attribute.PE_TYPE_SHLIB;
|
||||
} else if ((filhdr.f_flags & PEConstants.IMAGE_FILE_EXECUTABLE_IMAGE) != 0) {
|
||||
attrib.type = attrib.PE_TYPE_EXE;
|
||||
attrib.type = Attribute.PE_TYPE_EXE;
|
||||
} else {
|
||||
attrib.type = attrib.PE_TYPE_OBJ;
|
||||
attrib.type = Attribute.PE_TYPE_OBJ;
|
||||
}
|
||||
|
||||
// For PE always assume little endian unless otherwise.
|
||||
|
|
|
@ -530,7 +530,7 @@ public class Elf {
|
|||
} else {
|
||||
for (int i = 0; i < section.sh_size / section.sh_entsize; i++ ) {
|
||||
Dynamic dynEnt = new Dynamic(section, efile.readIntE(), efile.readIntE());
|
||||
if ( dynEnt.d_tag == dynEnt.DT_NULL )
|
||||
if ( dynEnt.d_tag == Dynamic.DT_NULL )
|
||||
break;
|
||||
dynList.add(dynEnt);
|
||||
}
|
||||
|
@ -617,16 +617,16 @@ public class Elf {
|
|||
|
||||
switch( ehdr.e_type ) {
|
||||
case Elf.ELFhdr.ET_CORE:
|
||||
attrib.type = attrib.ELF_TYPE_CORE;
|
||||
attrib.type = Attribute.ELF_TYPE_CORE;
|
||||
break;
|
||||
case Elf.ELFhdr.ET_EXEC:
|
||||
attrib.type = attrib.ELF_TYPE_EXE;
|
||||
attrib.type = Attribute.ELF_TYPE_EXE;
|
||||
break;
|
||||
case Elf.ELFhdr.ET_REL:
|
||||
attrib.type = attrib.ELF_TYPE_OBJ;
|
||||
attrib.type = Attribute.ELF_TYPE_OBJ;
|
||||
break;
|
||||
case Elf.ELFhdr.ET_DYN:
|
||||
attrib.type = attrib.ELF_TYPE_SHLIB;
|
||||
attrib.type = Attribute.ELF_TYPE_SHLIB;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -744,9 +744,9 @@ public class Elf {
|
|||
sections[i].sh_info = efile.readIntE();
|
||||
sections[i].sh_addralign = efile.readIntE();
|
||||
sections[i].sh_entsize = efile.readIntE();
|
||||
if ( sections[i].sh_type == sections[i].SHT_SYMTAB )
|
||||
if ( sections[i].sh_type == Section.SHT_SYMTAB )
|
||||
syms = i;
|
||||
if ( syms == 0 && sections[i].sh_type == sections[i].SHT_DYNSYM )
|
||||
if ( syms == 0 && sections[i].sh_type == Section.SHT_DYNSYM )
|
||||
syms = i;
|
||||
}
|
||||
}
|
||||
|
@ -843,7 +843,7 @@ public class Elf {
|
|||
}
|
||||
|
||||
public long swapInt( long val ) {
|
||||
if ( ehdr.e_ident[ehdr.EI_DATA] == ehdr.ELFDATA2LSB ) {
|
||||
if ( ehdr.e_ident[ELFhdr.EI_DATA] == ELFhdr.ELFDATA2LSB ) {
|
||||
short tmp[] = new short[4];
|
||||
tmp[0] = (short)(val & 0x00ff);
|
||||
tmp[1] = (short)((val >> 8) & 0x00ff);
|
||||
|
@ -855,7 +855,7 @@ public class Elf {
|
|||
}
|
||||
|
||||
public int swapShort( short val ) {
|
||||
if ( ehdr.e_ident[ehdr.EI_DATA] == ehdr.ELFDATA2LSB ) {
|
||||
if ( ehdr.e_ident[ELFhdr.EI_DATA] == ELFhdr.ELFDATA2LSB ) {
|
||||
short tmp[] = new short[2];
|
||||
tmp[0] = (short)(val & 0x00ff);
|
||||
tmp[1] = (short)((val >> 8) & 0x00ff);
|
||||
|
|
Loading…
Add table
Reference in a new issue