aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-vms.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-01-24 21:56:29 +0000
committerKen Raeburn <raeburn@cygnus>1995-01-24 21:56:29 +0000
commitf2224fe2496e8723da2a39a3bf38ac3eb9bfe685 (patch)
treebf827085a27bc946542ab65b36a688946e210762 /gas/config/obj-vms.c
parentc81a3fa9b60505ead0a2854d0b2ebe865878889e (diff)
downloadgdb-f2224fe2496e8723da2a39a3bf38ac3eb9bfe685.zip
gdb-f2224fe2496e8723da2a39a3bf38ac3eb9bfe685.tar.gz
gdb-f2224fe2496e8723da2a39a3bf38ac3eb9bfe685.tar.bz2
"gcc -fno-builtin -Wall -Wwrite-strings -Wshadow" can be your friend.
Well, sometimes. Bunch of patches from Pat Rankin for cleaning up some warnings in vax-vms gas.
Diffstat (limited to 'gas/config/obj-vms.c')
-rw-r--r--gas/config/obj-vms.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gas/config/obj-vms.c b/gas/config/obj-vms.c
index 3e7931f..5769854 100644
--- a/gas/config/obj-vms.c
+++ b/gas/config/obj-vms.c
@@ -168,7 +168,7 @@ struct forward_ref *f_ref_root =
* This variable is used to keep track of the name of the symbol we are
* working on while we are parsing the stabs directives.
*/
-static char *symbol_name;
+static const char *symbol_name;
/* We use this counter to assign numbers to all of the structures, unions
* and enums that we define. When we actually declare a variable to the
@@ -272,7 +272,7 @@ static int Current_Object_Record_Type; /* Type of record in above */
#define PUT_CHAR(val) Object_Record_Buffer[Object_Record_Offset++] = val
#define PUT_COUNTED_STRING(cp) {\
- register char *p = cp; \
+ register const char *p = cp; \
PUT_CHAR(strlen(p)); \
while (*p) PUT_CHAR(*p++);}
@@ -1589,7 +1589,7 @@ get_struct_name (str)
while ((*pnt != ':') && (*pnt != '\0'))
pnt--;
if (*pnt == '\0')
- return symbol_name;
+ return (char *) symbol_name;
*pnt-- = '\0';
while ((*pnt != ';') && (*pnt != '='))
pnt--;
@@ -2438,7 +2438,7 @@ VMS_typedef_parse (str)
{
char *pnt;
char *pnt1;
- char *pnt2;
+ const char *pnt2;
int i;
int dtype;
struct forward_ref *fpnt;
@@ -3129,7 +3129,8 @@ get_VMS_time_on_unix (Now)
static void
Write_VMS_MHD_Records ()
{
- register char *cp, *cp1;
+ register const char *cp;
+ register char *cp1;
register int i;
struct
{
@@ -3510,9 +3511,9 @@ VMS_Modify_Psect_Attributes (Name, Attribute_Pointer)
register int i;
register char *cp;
int Negate;
- static struct
+ static const struct
{
- char *Name;
+ const char *Name;
int Value;
} Attributes[] =
{