This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Minor readelf portability glitch
- To: binutils at sources dot redhat dot com
- Subject: Minor readelf portability glitch
- From: law at redhat dot com
- Date: Fri, 09 Nov 2001 19:56:58 -0500
- Reply-to: law at redhat dot com
ANSI/ISO doesn't allow arguments which are smaller than an int in functions
which are prototyped, but have an old-style traditional definition. ie
static foo (short);
foo (x)
short x;
{
}
readelf violated that rule in a few places.
Fri Nov 9 17:55:39 2001 Jeffrey A Law (law@cygnus.com)
* readelf.c (get_elf_class): Fix ISO portability glitch.
(get_data_encoding, get_osabi_name, request_dump): Likewise.
Index: readelf.c
===================================================================
RCS file: /cvs/cvsfiles/devo/binutils/readelf.c,v
retrieving revision 1.158
diff -c -3 -p -r1.158 readelf.c
*** readelf.c 2001/11/05 23:20:33 1.158
--- readelf.c 2001/11/10 00:52:07
*************** static void add_abbrev_att
*** 264,273 ****
static unsigned char * read_and_display_attr PARAMS ((unsigned
long, unsigned long, unsigned char *, unsigned long, unsigned long));
static unsigned char * display_block PARAMS ((unsigned char
*, unsigned long));
static void decode_location_expression PARAMS ((unsigned char
*, unsigned int, unsigned long));
! static void request_dump PARAMS ((unsigned int, char));
! static const char * get_elf_class PARAMS ((unsigned
char));
! static const char * get_data_encoding PARAMS ((unsigned
char));
! static const char * get_osabi_name PARAMS ((unsigned
char));
static int guess_is_rela PARAMS ((unsigned long));
static char * get_note_type PARAMS ((unsigned int));
static int process_note PARAMS ((Elf32_Internal_Note *));
--- 264,273 ----
static unsigned char * read_and_display_attr PARAMS ((unsigned
long, unsigned long, unsigned char *, unsigned long, unsigned long));
static unsigned char * display_block PARAMS ((unsigned char
*, unsigned long));
static void decode_location_expression PARAMS ((unsigned char
*, unsigned int, unsigned long));
! static void request_dump PARAMS ((unsigned int, int));
! static const char * get_elf_class PARAMS ((unsigned
int));
! static const char * get_data_encoding PARAMS ((unsigned
int));
! static const char * get_osabi_name PARAMS ((unsigned
int));
static int guess_is_rela PARAMS ((unsigned long));
static char * get_note_type PARAMS ((unsigned int));
static int process_note PARAMS ((Elf32_Internal_Note *));
*************** usage ()
*** 2262,2268 ****
static void
request_dump (section, type)
unsigned int section;
! char type;
{
if (section >= num_dump_sects)
{
--- 2262,2268 ----
static void
request_dump (section, type)
unsigned int section;
! int type;
{
if (section >= num_dump_sects)
{
*************** parse_args (argc, argv)
*** 2473,2479 ****
static const char *
get_elf_class (elf_class)
! unsigned char elf_class;
{
static char buff [32];
--- 2473,2479 ----
static const char *
get_elf_class (elf_class)
! unsigned int elf_class;
{
static char buff [32];
*************** get_elf_class (elf_class)
*** 2490,2496 ****
static const char *
get_data_encoding (encoding)
! unsigned char encoding;
{
static char buff [32];
--- 2490,2496 ----
static const char *
get_data_encoding (encoding)
! unsigned int encoding;
{
static char buff [32];
*************** get_data_encoding (encoding)
*** 2507,2513 ****
static const char *
get_osabi_name (osabi)
! unsigned char osabi;
{
static char buff [32];
--- 2507,2513 ----
static const char *
get_osabi_name (osabi)
! unsigned int osabi;
{
static char buff [32];