summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-19 13:15:51 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-19 13:15:51 +0000
commitdd9977e9d827caaa0712c625804cade660dd5beb (patch)
treeeaf63c52b5062fa22f55d651138eb5cd20b0a102 /gcc/varasm.c
parentec96e4ed1757343dff78ed5ec7b70f1389da125c (diff)
downloadgcc-dd9977e9d827caaa0712c625804cade660dd5beb.tar.gz
Warning fixes:
* builtins.c (c_getstr): Constify variable. * gmon-sol2.c (_mcleanup): Comment out #endif labels. * conflict.c (const_conflict_graph_arc): New typedef. (arc_hash, arc_eq): Avoid needlessly casting away const-ness. * cppmacro.c (builtin_macro): Likewise. * dwarf2out.c (output_comp_unit): Constify variable. * fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF. * protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper. * ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting away const-ness. * tradcpp.c (rescan, do_line, macroexpand, macarg): Use ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint. * varasm.c (const_str_htab_hash, const_str_htab_eq, compare_constant_1, record_constant_1): Constify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 8faedda980f..170cf09ab1c 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2402,7 +2402,7 @@ static hashval_t
const_str_htab_hash (x)
const void *x;
{
- return STRHASH (((struct deferred_string *) x)->label);
+ return STRHASH (((const struct deferred_string *) x)->label);
}
/* Returns non-zero if the value represented by X (which is really a
@@ -2414,7 +2414,7 @@ const_str_htab_eq (x, y)
const void *x;
const void *y;
{
- return (((struct deferred_string *) x)->label == (char *) y);
+ return (((const struct deferred_string *) x)->label == (const char *) y);
}
/* Delete the hash table entry dfsp. */
@@ -2607,7 +2607,7 @@ compare_constant_1 (exp, p)
if ((enum machine_mode) *p++ != TYPE_MODE (TREE_TYPE (exp)))
return 0;
- strp = (unsigned char *)TREE_STRING_POINTER (exp);
+ strp = (const unsigned char *)TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp);
if (memcmp ((char *) &TREE_STRING_LENGTH (exp), p,
sizeof TREE_STRING_LENGTH (exp)))
@@ -2750,8 +2750,8 @@ compare_constant_1 (exp, p)
return 0;
/* Compare symbol name. */
- strp = (unsigned char *) XSTR (value.base, 0);
- len = strlen ((char *) strp) + 1;
+ strp = (const unsigned char *) XSTR (value.base, 0);
+ len = strlen ((const char *) strp) + 1;
}
break;
@@ -2816,7 +2816,7 @@ static void
record_constant_1 (exp)
tree exp;
{
- register unsigned char *strp;
+ register const unsigned char *strp;
register int len;
register enum tree_code code = TREE_CODE (exp);
@@ -2841,7 +2841,7 @@ record_constant_1 (exp)
return;
obstack_1grow (&permanent_obstack, TYPE_MODE (TREE_TYPE (exp)));
- strp = (unsigned char *) TREE_STRING_POINTER (exp);
+ strp = (const unsigned char *) TREE_STRING_POINTER (exp);
len = TREE_STRING_LENGTH (exp);
obstack_grow (&permanent_obstack, (char *) &TREE_STRING_LENGTH (exp),
sizeof TREE_STRING_LENGTH (exp));