[Tile-serving] [osm2pgsql] Cleanup based on the output of LLVM's static analyzer (#299)

Daniel J. H. notifications at github.com
Sat Feb 21 17:46:36 UTC 2015


>  } // anonymous namespace
>  
>  void middle_pgsql_t::stop(void)
>  {
>      int i;
>  #ifdef HAVE_PTHREAD
> -    pthread_t threads[num_tables];
> +    std::vector<pthread_t> threads(num_tables);

This is not legal C++. VLA's are an extension and not included in (even the latest) C++ standard. The reason for using std::vector here is not failing to compile using a standard conforming compiler (e.g. with -pedantic or without extensions).

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/299/files#r25123914
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20150221/e876ca32/attachment.html>


More information about the Tile-serving mailing list