OpenNI2 icon indicating copy to clipboard operation
OpenNI2 copied to clipboard

GCC 7.2 Array subscript is below array bounds

Open JGMonroy opened this issue 7 years ago • 4 comments

Hello, I'm using an Orbec Astra Camera in ROS by doing use of the ros_astra_camera node that relies on this Openni2 version. I'm running Xubuntu 16.04 but with GCC 7.2.

When compiling the ros_astra_camera node I got eh following error:

Formats/XnFormatsMirror.cpp: In function ‘XnStatus XnMirrorOneBytePixels(XnUChar*, XnUInt32, XnUInt32)’: Formats/XnFormatsMirror.cpp:46:11: error: array subscript is below array bounds [-Werror=array-bounds]
  XnUInt8* pDestEnd = &pLineBuffer[0] - 1;

Googling this error points me out to a bug in OpennNI2 back when GCC 6 was released. I do not know if this has something to do, but any help will be appreciated.

JGMonroy avatar Apr 17 '18 08:04 JGMonroy