KWSys: Fix hashtable prime list on g++ 2.9 ()

Building CMake with g++ 2.9-aix51-020209 on an AIX 5.3 system gives:

 cmsys/hashtable.hxx: In function `const long unsigned int *cmsys::get_stl_prime_list ()':
 cmsys/hashtable.hxx:399: warning: sorry: semantics of inline function static data
  `const long unsigned int _stl_prime_list[31]' are wrong (you'll wind up with multiple copies)
 cmsys/hashtable.hxx:399: warning: you can work around this by removing the initializer

Give get_stl_prime_list internal linkage.
This commit is contained in:
Daniel R. Gomez 2012-06-05 16:19:06 -04:00 committed by Brad King
parent 7687d557dc
commit 4f170e2575
1 changed files with 1 additions and 1 deletions
Source/kwsys

View File

@ -394,7 +394,7 @@ enum { _stl_num_primes = 31 };
// create a function with a static local to that function that returns
// the static
inline const unsigned long* get_stl_prime_list() {
static inline const unsigned long* get_stl_prime_list() {
static const unsigned long _stl_prime_list[_stl_num_primes] =
{