bitcraze / lps-node-firmware

GNU Lesser General Public License v3.0
83 stars 79 forks source link

void pointer don't add/reduce #30

Closed xingqing6210 closed 6 years ago

xingqing6210 commented 6 years ago

hi,

we see the code about:

const void* anchorDataPtr = &rangePacket->remoteAnchorData;
anchorDataPtr += sizeof(remoteAnchorDataFull_t);

or

return (void*)anchorDataPtr - (void*)rangePacket;

maybe report the error expression must be a pointer to a complete object type

krichardsson commented 6 years ago

It seems as GNU C accepts void* arithmetics (treaded as a pointer to bytes) while it is not supported by the C standard.

Thanks!