Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3523 closed defect (fixed)

kmeans compile warnings

Reported by: robe Owned by: pramsey
Priority: low Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description

lwkmeans.c: In function 'lwgeom_cluster_2d_kmeans':
lwkmeans.c:179:14: warning: 'min.x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  dx = (max.x - min.x)/k;
              ^
lwkmeans.c:180:14: warning: 'min.y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  dy = (max.y - min.y)/k;
              ^
lwkmeans.c:179:14: warning: 'max.x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  dx = (max.x - min.x)/k;
              ^
lwkmeans.c:180:14: warning: 'max.y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  dy = (max.y - min.y)/k;

Change History (3)

comment:1 by strk, 9 years ago

I'm getting these too. It's annoying as they hide more serious warnings in the noise.

comment:2 by dbaston, 9 years ago

Resolution: fixed
Status: newclosed

Resolved by the combination of r14890, r14892, r14893

comment:3 by robe, 9 years ago

thanks Dan. Maybe it will fix my 32-bit issue that comes every so often with kmeans or at least make it easier to troubleshoot.

Note: See TracTickets for help on using tickets.