particle-iot-archived/core-common-lib

Review warning on incompatible pointer type uint8* vs int32*

Closed this issue · 1 comments

Found while reviewing issue #23 / #24, but appears to have been there for a while. Requires a lot of digging into what the host driver event handler does with a length passed by reference to be output.

../CC3000_Host_Driver/nvmem.c: In function 'nvmem_read':
../CC3000_Host_Driver/nvmem.c:109:2: warning: passing argument 3 of 'SimpleLinkWaitData' from incompatible pointer type [enabled by default]
In file included from ../CC3000_Host_Driver/nvmem.h:38:0,
                 from ../CC3000_Host_Driver/nvmem.c:45:
../CC3000_Host_Driver/cc3000_common.h:260:13: note: expected 'UINT8 *' but argument is of type 'INT32 *'

and

../CC3000_Host_Driver/socket.c: In function 'simple_link_recv':
../CC3000_Host_Driver/socket.c:895:3: warning: passing argument 3 of 'SimpleLinkWaitData' from incompatible pointer type [enabled by default]
In file included from ../CC3000_Host_Driver/hci.h:38:0,
                 from ../CC3000_Host_Driver/socket.c:47:
../CC3000_Host_Driver/cc3000_common.h:260:13: note: expected 'UINT8 *' but argument is of type 'long int *'

Fixed with the hal refactor - the code builds without warnings (all warnings are errors.)