This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
The following piece of code cannot work correctly IMO:
stamp stamp_string(const char *str) deletes
{
int st;
assert(str_hash != NULL);
if (! hash_table_lookup(str_hash,(hash_key)str, (hash_data *) &st))
{
st = stamp_fresh();
(void)hash_table_insert(str_hash,(hash_key)str,(hash_data) st);
}
return st;
}
hash_data is a pointer. Daniel, can you look at the code? I don't
fully understand it so I'm not sure how to fix it properly.
Btw. GCC complains about this on a 64-bit platform with:
/cvs/gcc-tree-ssa-20020619-branch/libbanshee/engine/stamp.c:93: warning: cast to pointer from integer of different size
There's a similar warning which can be avoided with some extra
cast, the code itself looks correct - but the function is not used
anywhere, we can remove ptr_hash as far as I can see:
/cvs/gcc-tree-ssa-20020619-branch/libbanshee/engine/util.c:177: warning: cast from pointer to integer of different size
Andreas
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |