* "computed value not used" Warnings in gcc 3.1 beta
@ 2002-03-12 0:09 Dylan Cuthbert
0 siblings, 0 replies; only message in thread
From: Dylan Cuthbert @ 2002-03-12 0:09 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-12 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-12 0:09 "computed value not used" Warnings in gcc 3.1 beta Dylan Cuthbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).