From 4f170e25752c995d8c51391cea60d86b549ea150 Mon Sep 17 00:00:00 2001 From: "Daniel R. Gomez" Date: Tue, 5 Jun 2012 16:19:06 -0400 Subject: KWSys: Fix hashtable prime list on g++ 2.9 (#13273) 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. --- Source/kwsys/hashtable.hxx.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/kwsys/hashtable.hxx.in b/Source/kwsys/hashtable.hxx.in index db52fc8..c835503 100644 --- a/Source/kwsys/hashtable.hxx.in +++ b/Source/kwsys/hashtable.hxx.in @@ -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] = { -- cgit v0.12