Hi,
g++-4.2 generates warnings compiling applications
using libaspell.
The warnings are mostly sourcing from not passing to a base class copy-
constructor. The patch is attached.
Truly,
Hypo Stases
diff -Naru aspell/common/convert.hpp aspell-mod/common/convert.hpp
--- aspell/common/convert.hpp 2005-05-03 08:08:19.000000000 +0300
+++ aspell-mod/common/convert.hpp 2007-10-23 20:16:30.000000000 +0200
@@ -33,7 +33,7 @@
};
struct Decode : public ConvBase {
- virtual PosibErr<void> init(ParmStr code, const Config &) {return no_err;}
+ virtual PosibErr<void> init(ParmStr code, const Config &) {(void)code; return no_err;}
virtual void decode(const char * in, int size,
FilterCharVector & out) const = 0;
virtual PosibErr<void> decode_ec(const char * in, int size,
diff -Naru aspell/common/string.hpp aspell-mod/common/string.hpp
--- aspell/common/string.hpp 2005-05-03 08:08:19.000000000 +0300
+++ aspell-mod/common/string.hpp 2007-10-23 20:15:49.000000000 +0200
@@ -145,7 +145,7 @@
String(const char * s, unsigned size) {assign_only(s, size);}
String(ParmStr s) {assign_only(s, s.size());}
String(MutableString s) {assign_only(s.str, s.size);}
- String(const String & other) {assign_only(other.begin_, other.end_-other.begin_);}
+ String(const String & other) : OStream (other) {assign_only(other.begin_, other.end_-other.begin_);}
//
// assign
diff -Naru aspell/common/string_list.hpp aspell-mod/common/string_list.hpp
--- aspell/common/string_list.hpp 2005-05-03 08:08:19.000000000 +0300
+++ aspell-mod/common/string_list.hpp 2007-10-23 20:16:16.000000000 +0200
@@ -61,7 +61,7 @@
public:
friend bool operator==(const StringList &, const StringList &);
StringList() : first(0) {}
- StringList(const StringList & other)
+ StringList(const StringList & other) : MutableContainer (other)
{
copy(other);
}
diff -Naru aspell/common/string_map.hpp aspell-mod/common/string_map.hpp
--- aspell/common/string_map.hpp 2005-05-03 08:08:19.000000000 +0300
+++ aspell-mod/common/string_map.hpp 2007-10-23 20:16:03.000000000 +0200
@@ -46,8 +46,8 @@
PosibErr<void> clear() {lookup_.clear(); buffer_.reset(); return no_err;}
StringMap() {}
- StringMap(const StringMap & other) {copy(other);}
- StringMap & operator= (const StringMap & o) {clear(); copy(o); return *this;}
+ StringMap(const StringMap & other) : MutableContainer (other) {copy(other);}
+ StringMap & operator= (const StringMap & other) {clear(); copy(other); return *this;}
~StringMap() {}
StringMap * clone() const {
diff -Naru aspell/modules/speller/default/lang_impl.hpp aspell-mod/modules/speller/default/lang_impl.hpp
--- aspell/modules/speller/default/lang_impl.hpp 2005-05-03 08:08:19.000000000 +0300
+++ aspell-mod/modules/speller/default/lang_impl.hpp 2007-10-23 20:15:16.000000000 +0200
@@ -246,6 +246,7 @@
while (*str) {if (!is_clean(*str++)) return false;} return true;}
bool is_clean_wi(WordInfo wi) const {
+ (void)wi;
return false;
//return wi & CASE_PATTEN == AllLower &&
}
_______________________________________________
Aspell-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/aspell-devel