aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-20 21:50:13 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-20 21:50:13 +0000
commit6f57920769f487e617e44025d103f35fdb923870 (patch)
tree259767c12d7657e0e50b6cf4b20f8781262ef182 /libobjc
parent19489abdae422545cf21f5234f199cd9a7e664e5 (diff)
* objc/hash.h (hash_string): Don't use a cast as an lvalue.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72722 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog4
-rw-r--r--libobjc/objc/hash.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index b7226be1c69..b3a26b25209 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-20 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * objc/hash.h (hash_string): Don't use a cast as an lvalue.
+
2003-10-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.in (runtime-info.h): Use MULTIFLAGS.
diff --git a/libobjc/objc/hash.h b/libobjc/objc/hash.h
index acb6c9979d4..02aca6e8765 100644
--- a/libobjc/objc/hash.h
+++ b/libobjc/objc/hash.h
@@ -172,10 +172,10 @@ hash_string (cache_ptr cache, const void *key)
{
unsigned int ret = 0;
unsigned int ctr = 0;
+ const char *ckey = key;
-
- while (*(const char *) key) {
- ret ^= *((const char *) key)++ << ctr;
+ while (*ckey) {
+ ret ^= *ckey++ << ctr;
ctr = (ctr + 1) % sizeof (void *);
}