Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GCC warnings #162

Closed
wants to merge 7 commits into from
Closed

Fix GCC warnings #162

wants to merge 7 commits into from

Conversation

Komzpa
Copy link
Member

@Komzpa Komzpa commented Oct 11, 2017

Patch by Darafei Praliaskouski me@komzpa.net

Obey const pointer in autofix logic.

Patch by Darafei Praliaskouski <me@komzpa.net>

Obey const pointer in autofix logic.
{
ptarray_append_point(pa, getPoint_internal(pa, 0), LW_TRUE);
ptarray_append_point(npa, (POINT4D*)getPoint_internal(npa, 0), LW_TRUE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you use getPoint4d_p instead? Getting addicted to pointing right into the array is a good way to start reading off the end of it.

@pramsey
Copy link
Member

pramsey commented Oct 11, 2017

Very not good, in make check

  Test: test_lwgeom_clip_by_rect ...make[1]: *** [check] Segmentation fault: 11

@pramsey
Copy link
Member

pramsey commented Oct 11, 2017

Why all this mucking around screwing w/ const inputs in ptarray_to_GEOSLinearRing when in ptarray_to_GEOSCoordSeq you can create and return a coordseq of the desired size without mutating the input (and, btw, breaking the const contract!)

@Komzpa
Copy link
Member Author

Komzpa commented Oct 12, 2017

@pramsey thanks! I did as you suggested. The only warning left is fixed in separate PR, #161

@strk
Copy link
Member

strk commented Oct 12, 2017

Trac ticket: https://trac.osgeo.org/postgis/ticket/3900

@Komzpa Komzpa closed this Oct 12, 2017
@Komzpa
Copy link
Member Author

Komzpa commented Oct 12, 2017

Committed

@Komzpa Komzpa deleted the patch-14 branch October 25, 2018 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants