From 0926de5ab24d3deae670b7c136752e40484f7966 Mon Sep 17 00:00:00 2001 From: David Inglis Date: Wed, 9 Oct 2002 12:40:43 +0000 Subject: [PATCH] cleanup warnings --- .../utils/org/eclipse/cdt/utils/elf/AR.java | 6 ++--- .../utils/org/eclipse/cdt/utils/elf/Elf.java | 24 +++++++++---------- .../eclipse/cdt/utils/spawner/Spawner.java | 8 +++---- .../ui/preferences/MIPreferencePage.java | 2 +- .../cdt/launch/ui/CEnvironmentTab.java | 14 +++++------ 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java index 757d716bb34..29598aad7a0 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/AR.java @@ -21,10 +21,10 @@ import java.util.Vector; */ public class AR { - private String filename; - private ERandomAccessFile efile; + protected String filename; + protected ERandomAccessFile efile; + protected long strtbl_pos = -1; private ARHeader[] headers; - private long strtbl_pos = -1; public void dispose() { diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java index 4d79ec2c9da..6edaa5be816 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java @@ -17,22 +17,22 @@ import org.eclipse.cdt.utils.CPPFilt; public class Elf { protected ERandomAccessFile efile; - private ELFhdr ehdr; - private Section[] sections; + protected ELFhdr ehdr; + protected Section[] sections; + protected Addr2line addr2line; + protected boolean cppFiltEnabled = true; + protected CPPFilt cppFilt; + protected String file; + protected byte[] section_strtab; + private int syms = 0; - private Addr2line addr2line; - private boolean cppFiltEnabled = true; - private CPPFilt cppFilt; - private String file; - private byte[] section_strtab; private Symbol[] symbols; - // private Section sym; private Symbol[] symtab_symbols; private Section symtab_sym; private Symbol[] dynsym_symbols; private Section dynsym_sym; - private String EMPTY_STRING = ""; + protected String EMPTY_STRING = ""; public class ELFhdr { @@ -101,7 +101,7 @@ public class Elf { public short e_shnum; /* Number of section headers (Elf32_Half)*/ public short e_shstrndx; /* String table index (Elf32_Half)*/ - private ELFhdr() throws IOException { + protected ELFhdr() throws IOException { efile.seek(0); efile.readFully(e_ident); if ( e_ident[ELFhdr.EI_MAG0] != 0x7f || e_ident[ELFhdr.EI_MAG1] != 'E' || @@ -185,7 +185,7 @@ public class Elf { } } - private String string_from_elf_section(Elf.Section section, int index) throws IOException { + protected String string_from_elf_section(Elf.Section section, int index) throws IOException { StringBuffer str = new StringBuffer(); byte tmp; if ( index > section.sh_size ) { @@ -491,7 +491,7 @@ public class Elf { private Section section; private String name; - private Dynamic(Section section, long tag, long val) { + protected Dynamic(Section section, long tag, long val) { this.section = section; d_tag = tag; d_val = val; diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java index 36dd0c8cfc1..12dc19b13ba 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java @@ -19,10 +19,10 @@ public class Spawner extends Process { private int KILL = 9; private int TERM = 15; - private int pid = 0; - private int status; - private int[] channels = new int[3]; - private boolean isDone; + int pid = 0; + int status; + int[] channels = new int[3]; + boolean isDone; OutputStream out; InputStream in; InputStream err; diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java index d4e3f00cfeb..25f259c50ae 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java +++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/preferences/MIPreferencePage.java @@ -37,7 +37,7 @@ import org.eclipse.ui.help.WorkbenchHelp; public class MIPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { // Timeout preference widgets - private IntegerFieldEditor fTimeoutText; + IntegerFieldEditor fTimeoutText; /** * Constructor for MIPreferencePage. diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java index 8662c6f756e..8593bdd58a2 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CEnvironmentTab.java @@ -170,7 +170,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab { fBtnCancel = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } - private void updateButtonsState() { + protected void updateButtonsState() { if (fBtnOk != null) fBtnOk.setEnabled(fTextName.getText().trim().length() > 0); } @@ -308,19 +308,19 @@ public class CEnvironmentTab extends CLaunchConfigurationTab { }); } - private void updateButtons() { + protected void updateButtons() { IStructuredSelection selection = (IStructuredSelection) fVariableList.getSelection(); fBtnEdit.setEnabled(selection.size() == 1); fBtnRemove.setEnabled(selection.size() > 0); } - private void elementDoubleClicked(IStructuredSelection selection) { + protected void elementDoubleClicked(IStructuredSelection selection) { if (selection.size() != 1) return; doEdit((Map.Entry) selection.getFirstElement()); } - private void newEntry() { + protected void newEntry() { EntryDialog dialog = new EntryDialog(new String(), new String(), false); if (dialog.open() == dialog.OK) { fElements.setProperty(dialog.getName(), dialog.getValue()); @@ -329,12 +329,12 @@ public class CEnvironmentTab extends CLaunchConfigurationTab { updateButtons(); } - private void edit() { + protected void edit() { IStructuredSelection selection = (IStructuredSelection) fVariableList.getSelection(); doEdit((Map.Entry) selection.getFirstElement()); } - private void doEdit(Map.Entry entry) { + protected void doEdit(Map.Entry entry) { EntryDialog dialog = new EntryDialog(entry.getKey().toString(), entry.getValue().toString(), true); if (dialog.open() == dialog.OK) { fElements.remove(entry.getKey()); @@ -344,7 +344,7 @@ public class CEnvironmentTab extends CLaunchConfigurationTab { updateButtons(); } - private void remove() { + protected void remove() { IStructuredSelection selection = (IStructuredSelection) fVariableList.getSelection(); Object[] elements = selection.toArray(); for (int i = 0; i < elements.length; ++i)