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

Paul Norman notifications at github.com
Sat Feb 21 16:11:58 UTC 2015


> @@ -742,7 +740,7 @@ int output_gazetteer_t::process_relation(osmid_t id, struct member *members,
>          return 0;
>  
>      /* get the boundary path (ways) */
> -    osmid_t *xid2 = new osmid_t[member_count+1];
> +    std::vector<osmid_t> xid2(member_count+1);

I'm not sure we need the +1 here.

The largest access I see of xid2 is at member_count, when all members are ways.

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


More information about the Tile-serving mailing list