diff options
author | joerg <joerg@pkgsrc.org> | 2012-05-04 16:01:04 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2012-05-04 16:01:04 +0000 |
commit | e889eba5352621b2614e91c5b49c83750b1922c5 (patch) | |
tree | 67379cff30a08ae20d26f877b11546d1f682f795 /audio/festival | |
parent | bc64d1e30bffcacbfe04c3fcc6666f23f8d0b52a (diff) | |
download | pkgsrc-e889eba5352621b2614e91c5b49c83750b1922c5.tar.gz |
Fix C++ issues for the stricter checks in clang
Diffstat (limited to 'audio/festival')
13 files changed, 270 insertions, 1 deletions
diff --git a/audio/festival/distinfo b/audio/festival/distinfo index 5b2da0afdb9..707ab7b92fc 100644 --- a/audio/festival/distinfo +++ b/audio/festival/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.17 2011/12/17 10:14:40 sbd Exp $ +$NetBSD: distinfo,v 1.18 2012/05/04 16:01:04 joerg Exp $ SHA1 (festival-2.1-release.tar.gz) = f0c5a4282667898c584516e3605742835f59cb77 RMD160 (festival-2.1-release.tar.gz) = b3c646ecc532e4e05f846db06bbab12a13ec1d6b @@ -11,4 +11,16 @@ SHA1 (patch-ab) = 7f22ea2a89caf72dcb18818eb98bdb54911d5e7c SHA1 (patch-ac) = 9ffe5f44dc50d9ab5161b9ca107956e799fff463 SHA1 (patch-ae) = 9d630d198f829979508b90416ddb0f56d721b422 SHA1 (patch-aq) = 81109b22e5db0f733fa2a3d8e7cdef1cdcbe0185 +SHA1 (patch-speech__tools_base__class_EST__TSimpleMatrix.cc) = e1ad503b0ea0f7c2e051cbc633dc343f5df5164f +SHA1 (patch-speech__tools_base__class_EST__TSimpleVector.cc) = 07acc5515d038733eeddd84ea6245e1fd0d2894a +SHA1 (patch-speech__tools_base__class_EST__TVector.cc) = 0e205df1ac66bb747696c72eee08db16ca58865f +SHA1 (patch-speech__tools_base__class_inst__tmpl_vector__dmatrix__t.cc) = 5ee2d525df6a289b376bfa3375b8905d5752dad4 +SHA1 (patch-speech__tools_base__class_inst__tmpl_vector__dvector__t.cc) = 8a2a4c1b1816c7be2479c0e0310cacfc9917c7ee +SHA1 (patch-speech__tools_base__class_inst__tmpl_vector__fmatrix__t.cc) = 1d64a2e5aa1dc8c5b7d275e2bf66b2e96b599c35 SHA1 (patch-speech__tools_config_rules_compile__options.mak) = d3aa93029edba84f8130f1bc33c8d74219bafd9a +SHA1 (patch-speech__tools_include_EST__SCFG.h) = d58bc030dec4d526a89719e32c3624c642f33f3e +SHA1 (patch-speech__tools_include_EST__TIterator.h) = db7617f5c4a802672ce3b098ecd512b6cdb96aeb +SHA1 (patch-speech__tools_include_EST__TNamedEnum.h) = f240a338d17d7a36a5dba1b0f3b48190b235bf03 +SHA1 (patch-speech__tools_include_ling__class_EST__FeatureFunctionPackage.h) = ec5eb54fba5a50b43d1a0c9f0a5ae36407f55bff +SHA1 (patch-speech__tools_stats_dynamic__program.cc) = d932f865d5c5577f7c1adc446adf9a2ab25c59c9 +SHA1 (patch-speech__tools_utils_EST__ServiceTable.cc) = d085b9e1a925a12e80e0fc25884f4373ba271fd5 diff --git a/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleMatrix.cc b/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleMatrix.cc new file mode 100644 index 00000000000..c4ea2afc683 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleMatrix.cc @@ -0,0 +1,33 @@ +$NetBSD: patch-speech__tools_base__class_EST__TSimpleMatrix.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/EST_TSimpleMatrix.cc.orig 2012-04-27 12:32:06.000000000 +0000 ++++ speech_tools/base_class/EST_TSimpleMatrix.cc +@@ -42,6 +42,7 @@ + + #include "EST_TSimpleMatrix.h" + #include "EST_TVector.h" ++#include <cstring> + #include <fstream> + #include <iostream> + #include "EST_cutils.h" +@@ -98,7 +99,7 @@ void EST_TSimpleMatrix<T>::resize(int ne + { + int copy_r = Lof(this->num_rows(), new_rows); + +- just_resize(new_rows, new_cols, &old_vals); ++ this->just_resize(new_rows, new_cols, &old_vals); + + for (q=0; q<(copy_r*new_cols*sizeof(T)); q++) /* memcpy */ + ((char *)this->p_memory)[q] = ((char *)old_vals)[q]; +@@ -127,9 +128,9 @@ void EST_TSimpleMatrix<T>::resize(int ne + int copy_r = Lof(this->num_rows(), new_rows); + int copy_c = Lof(this->num_columns(), new_cols); + +- just_resize(new_rows, new_cols, &old_vals); ++ this->just_resize(new_rows, new_cols, &old_vals); + +- set_values(old_vals, ++ this->set_values(old_vals, + old_row_step, old_column_step, + 0, copy_r, + 0, copy_c); diff --git a/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleVector.cc b/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleVector.cc new file mode 100644 index 00000000000..bababac7a71 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_EST__TSimpleVector.cc @@ -0,0 +1,21 @@ +$NetBSD: patch-speech__tools_base__class_EST__TSimpleVector.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/EST_TSimpleVector.cc.orig 2012-04-27 12:32:56.000000000 +0000 ++++ speech_tools/base_class/EST_TSimpleVector.cc +@@ -42,6 +42,7 @@ + + #include "EST_TSimpleVector.h" + #include "EST_matrix_support.h" ++#include <cstring> + #include <fstream> + #include "EST_cutils.h" + +@@ -70,7 +71,7 @@ template<class T> void EST_TSimpleVector + int old_offset = this->p_offset; + unsigned int q; + +- just_resize(newn, &old_vals); ++ this->just_resize(newn, &old_vals); + + if (set && old_vals) + { diff --git a/audio/festival/patches/patch-speech__tools_base__class_EST__TVector.cc b/audio/festival/patches/patch-speech__tools_base__class_EST__TVector.cc new file mode 100644 index 00000000000..6a4e386cf46 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_EST__TVector.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-speech__tools_base__class_EST__TVector.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/EST_TVector.cc.orig 2012-04-27 13:01:33.000000000 +0000 ++++ speech_tools/base_class/EST_TVector.cc +@@ -258,7 +258,7 @@ int EST_TVector<T>::operator == (const E + return 0; + + for(int i=0; i<num_columns() ; i++) +- if (fast_a_v(i) != v.fast_a_v(i)) ++ if (!(fast_a_v(i) == v.fast_a_v(i))) + return 0; + return 1; + } diff --git a/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dmatrix__t.cc b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dmatrix__t.cc new file mode 100644 index 00000000000..241d3a4487d --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dmatrix__t.cc @@ -0,0 +1,27 @@ +$NetBSD: patch-speech__tools_base__class_inst__tmpl_vector__dmatrix__t.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/inst_tmpl/vector_dmatrix_t.cc.orig 2012-04-27 12:36:31.000000000 +0000 ++++ speech_tools/base_class/inst_tmpl/vector_dmatrix_t.cc +@@ -40,6 +40,11 @@ + #include "EST_types.h" + #include "EST_TVector.h" + ++static const EST_DMatrix def_val_DMatrix; ++static EST_DMatrix error_return_DMatrix; ++template <> const EST_DMatrix *EST_TVector<EST_DMatrix>::def_val = &def_val_DMatrix; ++template <> EST_DMatrix *EST_TVector<EST_DMatrix>::error_return = &error_return_DMatrix; ++ + #if defined(INSTANTIATE_TEMPLATES) + + #include "../base_class/EST_TVector.cc" +@@ -47,10 +52,6 @@ + template class EST_TVector<EST_DMatrix>; + + #endif +-static const EST_DMatrix def_val_DMatrix; +-static EST_DMatrix error_return_DMatrix; +-template <> const EST_DMatrix *EST_TVector<EST_DMatrix>::def_val = &def_val_DMatrix; +-template <> EST_DMatrix *EST_TVector<EST_DMatrix>::error_return = &error_return_DMatrix; + + int operator !=(const EST_DMatrix &fm1, + const EST_DMatrix &fm2) diff --git a/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dvector__t.cc b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dvector__t.cc new file mode 100644 index 00000000000..4feac2f74bb --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__dvector__t.cc @@ -0,0 +1,27 @@ +$NetBSD: patch-speech__tools_base__class_inst__tmpl_vector__dvector__t.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/inst_tmpl/vector_dvector_t.cc.orig 2012-04-27 12:36:12.000000000 +0000 ++++ speech_tools/base_class/inst_tmpl/vector_dvector_t.cc +@@ -40,6 +40,11 @@ + #include "EST_types.h" + #include "EST_TVector.h" + ++static const EST_DVector def_val_DVector; ++static EST_DVector error_return_DVector; ++template <> const EST_DVector *EST_TVector<EST_DVector>::def_val = &def_val_DVector; ++template <> EST_DVector *EST_TVector<EST_DVector>::error_return = &error_return_DVector; ++ + #if defined(INSTANTIATE_TEMPLATES) + + #include "../base_class/EST_TVector.cc" +@@ -47,10 +52,6 @@ + template class EST_TVector<EST_DVector>; + + #endif +-static const EST_DVector def_val_DVector; +-static EST_DVector error_return_DVector; +-template <> const EST_DVector *EST_TVector<EST_DVector>::def_val = &def_val_DVector; +-template <> EST_DVector *EST_TVector<EST_DVector>::error_return = &error_return_DVector; + + int operator !=(const EST_DVector &fv1, + const EST_DVector &fv2) diff --git a/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__fmatrix__t.cc b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__fmatrix__t.cc new file mode 100644 index 00000000000..af8a8354358 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_base__class_inst__tmpl_vector__fmatrix__t.cc @@ -0,0 +1,26 @@ +$NetBSD: patch-speech__tools_base__class_inst__tmpl_vector__fmatrix__t.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/base_class/inst_tmpl/vector_fmatrix_t.cc.orig 2012-04-27 12:34:44.000000000 +0000 ++++ speech_tools/base_class/inst_tmpl/vector_fmatrix_t.cc +@@ -40,6 +40,10 @@ + #include "EST_types.h" + #include "EST_TVector.h" + ++static EST_FMatrix error_return_FMatrix; ++static const EST_FMatrix def_val_FMatrix; ++template <> const EST_FMatrix *EST_TVector<EST_FMatrix>::def_val = &def_val_FMatrix; ++template <> EST_FMatrix *EST_TVector<EST_FMatrix>::error_return = &error_return_FMatrix; + #if defined(INSTANTIATE_TEMPLATES) + + #include "../base_class/EST_TVector.cc" +@@ -48,10 +52,6 @@ template class EST_TVector<EST_FMatrix>; + + + #endif +-static const EST_FMatrix def_val_FMatrix; +-static EST_FMatrix error_return_FMatrix; +-template <> const EST_FMatrix *EST_TVector<EST_FMatrix>::def_val = &def_val_FMatrix; +-template <> EST_FMatrix *EST_TVector<EST_FMatrix>::error_return = &error_return_FMatrix; + + int operator !=(const EST_FMatrix &fm1, + const EST_FMatrix &fm2) diff --git a/audio/festival/patches/patch-speech__tools_include_EST__SCFG.h b/audio/festival/patches/patch-speech__tools_include_EST__SCFG.h new file mode 100644 index 00000000000..74f4da9b860 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_include_EST__SCFG.h @@ -0,0 +1,13 @@ +$NetBSD: patch-speech__tools_include_EST__SCFG.h,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/include/EST_SCFG.h.orig 2012-04-27 12:52:20.000000000 +0000 ++++ speech_tools/include/EST_SCFG.h +@@ -85,6 +85,8 @@ class EST_bracketed_string { + int valid(int i,int k) const { return valid_spans[i][k]; } + + /// ++ int operator ==(const EST_bracketed_string &a) const ++ { return (this == &a); } + int operator !=(const EST_bracketed_string &a) const + { return (!(this == &a)); } + /// diff --git a/audio/festival/patches/patch-speech__tools_include_EST__TIterator.h b/audio/festival/patches/patch-speech__tools_include_EST__TIterator.h new file mode 100644 index 00000000000..7ae40cf8b52 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_include_EST__TIterator.h @@ -0,0 +1,22 @@ +$NetBSD: patch-speech__tools_include_EST__TIterator.h,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/include/EST_TIterator.h.orig 2012-04-27 12:26:17.000000000 +0000 ++++ speech_tools/include/EST_TIterator.h +@@ -209,7 +209,7 @@ public: + + /// Create an iterator ready to run over the given container. + EST_TStructIterator(const Container &over) +- { begin(over); } ++ { this->begin(over); } + + const Entry *operator ->() const + {return &this->current();} +@@ -289,7 +289,7 @@ public: + + /// Create an iterator ready to run over the given container. + EST_TRwStructIterator(Container &over) +- { begin(over); } ++ { this->begin(over); } + + Entry *operator ->() const + {return &this->current();} diff --git a/audio/festival/patches/patch-speech__tools_include_EST__TNamedEnum.h b/audio/festival/patches/patch-speech__tools_include_EST__TNamedEnum.h new file mode 100644 index 00000000000..aaa120c3fbd --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_include_EST__TNamedEnum.h @@ -0,0 +1,13 @@ +$NetBSD: patch-speech__tools_include_EST__TNamedEnum.h,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/include/EST_TNamedEnum.h.orig 2012-04-27 12:28:44.000000000 +0000 ++++ speech_tools/include/EST_TNamedEnum.h +@@ -130,7 +130,7 @@ public: + {this->initialise((const void *)defs); }; + EST_TNamedEnumI(EST_TValuedEnumDefinition<const char *,const char *,INFO> defs[], ENUM (*conv)(const char *)) + {this->initialise((const void *)defs, conv); }; +- const char *name(ENUM tok, int n=0) const {return value(tok,n); }; ++ const char *name(ENUM tok, int n=0) const {return this->value(tok,n); }; + + }; + diff --git a/audio/festival/patches/patch-speech__tools_include_ling__class_EST__FeatureFunctionPackage.h b/audio/festival/patches/patch-speech__tools_include_ling__class_EST__FeatureFunctionPackage.h new file mode 100644 index 00000000000..9da1b3e4a91 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_include_ling__class_EST__FeatureFunctionPackage.h @@ -0,0 +1,12 @@ +$NetBSD: patch-speech__tools_include_ling__class_EST__FeatureFunctionPackage.h,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/include/ling_class/EST_FeatureFunctionPackage.h.orig 2012-04-27 12:41:31.000000000 +0000 ++++ speech_tools/include/ling_class/EST_FeatureFunctionPackage.h +@@ -70,5 +70,7 @@ public: + }; + + int operator == (const EST_FeatureFunctionPackage::Entry &a, const EST_FeatureFunctionPackage::Entry &b); ++ostream &operator << (ostream &s, EST_FeatureFunctionPackage::Entry &e); ++ + #endif + diff --git a/audio/festival/patches/patch-speech__tools_stats_dynamic__program.cc b/audio/festival/patches/patch-speech__tools_stats_dynamic__program.cc new file mode 100644 index 00000000000..ef31d4d77a4 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_stats_dynamic__program.cc @@ -0,0 +1,30 @@ +$NetBSD: patch-speech__tools_stats_dynamic__program.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/stats/dynamic_program.cc.orig 2012-04-27 12:49:30.000000000 +0000 ++++ speech_tools/stats/dynamic_program.cc +@@ -42,6 +42,12 @@ + #include "ling_class/EST_Utterance.h" + + typedef EST_TVector<EST_Item*> EST_Item_ptr_Vector; ++ ++static EST_Item *const def_val_item_ptr = NULL; ++template <> EST_Item* const *EST_Item_ptr_Vector::def_val = &def_val_item_ptr; ++static EST_Item* error_return_item_ptr = NULL; ++template <> EST_Item* *EST_Item_ptr_Vector::error_return = &error_return_item_ptr; ++ + #if defined(INSTANTIATE_TEMPLATES) + #include "../base_class/EST_TVector.cc" + +@@ -49,12 +55,6 @@ template class EST_TVector<EST_Item*>; + + #endif + +-static EST_Item *const def_val_item_ptr = NULL; +-template <> EST_Item* const *EST_Item_ptr_Vector::def_val = &def_val_item_ptr; +- +-static EST_Item* error_return_item_ptr = NULL; +-template <> EST_Item* *EST_Item_ptr_Vector::error_return = &error_return_item_ptr; +- + typedef + float (*local_cost_function)(const EST_Item *item1, + const EST_Item *item2); diff --git a/audio/festival/patches/patch-speech__tools_utils_EST__ServiceTable.cc b/audio/festival/patches/patch-speech__tools_utils_EST__ServiceTable.cc new file mode 100644 index 00000000000..e6461cf7178 --- /dev/null +++ b/audio/festival/patches/patch-speech__tools_utils_EST__ServiceTable.cc @@ -0,0 +1,20 @@ +$NetBSD: patch-speech__tools_utils_EST__ServiceTable.cc,v 1.1 2012/05/04 16:01:04 joerg Exp $ + +--- speech_tools/utils/EST_ServiceTable.cc.orig 2012-04-27 12:30:06.000000000 +0000 ++++ speech_tools/utils/EST_ServiceTable.cc +@@ -68,6 +68,7 @@ int gethostname(char *name, int namelen) + } + #endif + ++Declare_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry) + + EST_ServiceTable::EntryTable EST_ServiceTable::entries; + bool EST_ServiceTable::random_init=FALSE; +@@ -339,7 +340,6 @@ const EST_ServiceTable::Entry &EST_Servi + + + +-Declare_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry) + + #if defined(INSTANTIATE_TEMPLATES) + |