I have just committed a fairly large update to change the 2d arrays in our API from const PLFLT ** to const PLFLT * const *. Gcc warns about the use of const PLFLT ** because it only guarantees that the data is constant not the array of pointers to the data. It is therefore trivial to change the data by changing the pointers which is not what is intended. Both the pointer array and the data need to be marked const.
This is quite intrusive, but it seems to work ok for me. Please check. It is strictly an API change however existing code should still compile fine (possibly with warnings depending on the gcc settings). This does not remove all warnings - just shifts them (more later). It does however make the API and the examples clean which I think is more important for users. The const PLFLT * const * is a bit unwieldy however, so I propose making a new typedef (something like PLFLT_2D_CONST) to tidy up the code. Andrew ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel