"computed value not used" Warnings in gcc 3.1 beta
Dylan Cuthbert
dylan@q-games.com
Tue Mar 12 00:09:00 GMT 2002
Hello there
I get warnings from including ext/hash_map extended stl libraries.. the
warning occurs in ext/stl_hashtable.h:313 and I fixed it by doing the
following (I think)
hashtable& operator= (const hashtable& __ht)
{
if (&__ht != this) {
clear();
(void)(_M_hash = __ht._M_hash );
(void)(_M_equals = __ht._M_equals );
(void)(_M_get_key = __ht._M_get_key );
_M_copy_from(__ht);
}
return *this;
}
I added the (void)'s to prevent a "computed value is not used" warning. I
would prefer not to have to switch -Wall and -Werror off so is this the
proper way to fix this?
Also the warning/error output didn't tell me which line (or file even!) the
code was in that was invoking the above function - which makes finding the
lines involved rather difficult.
Regards
---------------------------------
Q-Games, Dylan Cuthbert.
http://www.q-games.com
More information about the Gcc-help
mailing list