From f39eae7baa17c6653aa625d201bf303bfc1592e8 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Fri, 22 Nov 1991 16:14:23 +0000 Subject: [PATCH] Lint --- bfd/ChangeLog | 4 +++ include/ChangeLog | 5 ++++ include/coff-rs6000.h | 56 +++++++++++++++++++++--------------------- include/internalcoff.h | 45 +++++++++++++++++++-------------- 4 files changed, 63 insertions(+), 47 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 394dbdda6a..98f04c6420 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 22 08:11:42 1991 John Gilmore (gnu at cygnus.com) + + * host-aout.c, trad-core.c: Fix write_armap prototypes. Lint. + Thu Nov 21 19:56:40 1991 Per Bothner (bothner at cygnus.com) * stab-syms.c, syms.c: Moved bfd_stab_name() and bfd_stab_names[] diff --git a/include/ChangeLog b/include/ChangeLog index 97ee40335e..8080bd0f58 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com) + + * coff-rs6000.h: Lint; use unsigned chars for external fields. + * internalcoff.h: Lint; cast storage classes to signed char. + Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com) * stab.def: Remove the GNU extended type codes (e.g. N_SETT). diff --git a/include/coff-rs6000.h b/include/coff-rs6000.h index c1dbd10f30..3d93a5bc8c 100755 --- a/include/coff-rs6000.h +++ b/include/coff-rs6000.h @@ -33,27 +33,27 @@ struct external_filehdr { typedef struct { - char magic[2]; /* type of file */ - char vstamp[2]; /* version stamp */ - char tsize[4]; /* text size in bytes, padded to FW bdry*/ - char dsize[4]; /* initialized data " " */ - char bsize[4]; /* uninitialized data " " */ - char entry[4]; /* entry pt. */ - char text_start[4]; /* base of text used for this file */ - char data_start[4]; /* base of data used for this file */ - char o_toc[4]; - char o_snentry[2]; - char o_sntext[2]; - char o_sndata[2]; - char o_sntoc[2]; - char o_snloader[2]; - char o_snbss[2]; - char o_algntext[2]; - char o_algndata[2]; - char o_modtype[2]; - char o_resv1[2]; - char o_maxstack[4]; - char o_resv2[16]; + unsigned char magic[2]; /* type of file */ + unsigned char vstamp[2]; /* version stamp */ + unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */ + unsigned char dsize[4]; /* initialized data " " */ + unsigned char bsize[4]; /* uninitialized data " " */ + unsigned char entry[4]; /* entry pt. */ + unsigned char text_start[4]; /* base of text used for this file */ + unsigned char data_start[4]; /* base of data used for this file */ + unsigned char o_toc[4]; + unsigned char o_snentry[2]; + unsigned char o_sntext[2]; + unsigned char o_sndata[2]; + unsigned char o_sntoc[2]; + unsigned char o_snloader[2]; + unsigned char o_snbss[2]; + unsigned char o_algntext[2]; + unsigned char o_algndata[2]; + unsigned char o_modtype[2]; + unsigned char o_resv1[2]; + unsigned char o_maxstack[4]; + unsigned char o_resv2[16]; } AOUTHDR; @@ -185,13 +185,13 @@ union external_auxent { } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ struct { - char x_scnlen[4], - x_parmhash[4], - x_snhash[2], - x_smtyp[1], - x_smclas[1], - x_stab[4], - x_snstab[2]; + unsigned char x_scnlen[4]; + unsigned char x_parmhash[4]; + unsigned char x_snhash[2]; + unsigned char x_smtyp[1]; + unsigned char x_smclas[1]; + unsigned char x_stab[4]; + unsigned char x_snstab[2]; } x_csect; }; diff --git a/include/internalcoff.h b/include/internalcoff.h index 879f20c522..d765166999 100755 --- a/include/internalcoff.h +++ b/include/internalcoff.h @@ -1,3 +1,13 @@ +/* Internal format of COFF object file data structures, for GNU BFD. + This file is part of BFD, the Binary File Descriptor library. */ + +/* First, make "signed char" work, even on old compilers. */ +#ifndef signed +#ifndef __STDC__ +#define signed /**/ +#endif +#endif + /********************** FILE HEADER **********************/ struct internal_filehdr { @@ -111,21 +121,21 @@ struct internal_aouthdr { #define C_EINCL 109 /* Marks ending of include file */ /* storage classes for stab symbols for RS/6000 */ -#define C_GSYM 0x80 -#define C_LSYM 0x81 -#define C_PSYM 0x82 -#define C_RSYM 0x83 -#define C_RPSYM 0x84 -#define C_STSYM 0x85 -#define C_TCSYM 0x86 -#define C_BCOMM 0x87 -#define C_ECOML 0x88 -#define C_ECOMM 0x89 -#define C_DECL 0x8c -#define C_ENTRY 0x8d -#define C_FUN 0x8e -#define C_BSTAT 0x8f -#define C_ESTAT 0x90 +#define C_GSYM ((signed char)0x80) +#define C_LSYM ((signed char)0x81) +#define C_PSYM ((signed char)0x82) +#define C_RSYM ((signed char)0x83) +#define C_RPSYM ((signed char)0x84) +#define C_STSYM ((signed char)0x85) +#define C_TCSYM ((signed char)0x86) +#define C_BCOMM ((signed char)0x87) +#define C_ECOML ((signed char)0x88) +#define C_ECOMM ((signed char)0x89) +#define C_DECL ((signed char)0x8c) +#define C_ENTRY ((signed char)0x8d) +#define C_FUN ((signed char)0x8e) +#define C_BSTAT ((signed char)0x8f) +#define C_ESTAT ((signed char)0x90) /********************** SECTION HEADER **********************/ struct internal_scnhdr { @@ -209,10 +219,7 @@ struct internal_syment { short n_scnum; /* section number */ unsigned short n_flags; /* copy of flags from filhdr */ unsigned short n_type; /* type and derived type */ -#if __STDC__ - signed -#endif - char n_sclass; /* storage class */ + signed char n_sclass; /* storage class */ char n_numaux; /* number of aux. entries */ }; #define n_name _n._n_name