pkg/lua/contrib: Fix warning on discarded qualifier.

There was a cast in a macro that calculated offsets. Since it was
only doing a pointer difference, the cast was inocuous, but I fix
it anyways.
This commit is contained in:
Juan Carrano 2018-10-18 11:15:22 +02:00 committed by Juan I Carrano
parent cf2bca0d53
commit a8a23e4d85

View File

@ -60,14 +60,14 @@ extern "C" {
* UNSAFE MACRO: Difference in bytes between the addresses of two consecutive
* array elements.
*/
#define _ARRAY_STRIDE(arr) ((size_t)((uint8_t *)((arr) + 1) - (uint8_t *)(arr)))
#define _ARRAY_STRIDE(arr) ((size_t)((const uint8_t *)((arr) + 1) - (const uint8_t *)(arr)))
/**
* UNSAFE MACRO: Offset in bytes from the start of the array to member "member"
* of the first element.
*/
#define _ARRAY_MEMBER_OFFS(arr, member) \
((size_t)((uint8_t *)(&((arr)->member)) - (uint8_t *)(arr)))
((size_t)((const uint8_t *)(&((arr)->member)) - (const uint8_t *)(arr)))
/**
* Find the index of the array element that contains "str" in