I get the following warnings on Ubuntu 64 bit system:
lwpr_mem.c: In function ‘lwpr_mem_alloc_rf’:
lwpr_mem.c:50:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c:82:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_realloc_rf’:
lwpr/src/lwpr_mem.c:118:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_alloc_model’:
lwpr_mem.c:186:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_alloc_ws’:
lwpr_mem.c:282:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void *) storage)) & 8) storage++;
It is because the int type is 32 bit on these systems and the pointers are 64 bit.
What would be the appropriate fix for this?
Thanks,
Csaba
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I get the following warnings on Ubuntu 64 bit system:
lwpr_mem.c: In function ‘lwpr_mem_alloc_rf’:
lwpr_mem.c:50:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c:82:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_realloc_rf’:
lwpr/src/lwpr_mem.c:118:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_alloc_model’:
lwpr_mem.c:186:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void ) storage)) & 8) storage++;
^
lwpr_mem.c: In function ‘lwpr_mem_alloc_ws’:
lwpr_mem.c:282:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
if (((int)((void *) storage)) & 8) storage++;
It is because the int type is 32 bit on these systems and the pointers are 64 bit.
What would be the appropriate fix for this?
Thanks,
Csaba
Many thanks for filing this, Csaba. We have posted a fix to this in the latest release (lwpr-1.2.6).
-Matthew