summaryrefslogtreecommitdiffstats
path: root/libobjc/objc
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/objc
parent19489abdae422545cf21f5234f199cd9a7e664e5 (diff)
downloadppe42-gcc-6f57920769f487e617e44025d103f35fdb923870.tar.gz
ppe42-gcc-6f57920769f487e617e44025d103f35fdb923870.zip
* 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/objc')
-rw-r--r--libobjc/objc/hash.h6
1 files changed, 3 insertions, 3 deletions
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 *);
}
OpenPOWER on IntegriCloud