I'm integrating a third party C code library into the XMOS environment and have encountered an issue with the string functions as specified in string.h.
I've followed the examples as best i can for using the safestring.h equivalents, but I'm still getting the below errors.
Can anyone advise on the correct syntax please?
The attachment shows the associated code fragments from a number of separate files for reference.
Kind regards,
Al
Combination 1
#define bzero(a, b) safememset(a, 0, b)
bzero((uint8_t *)message_info->payload.value8, message_info->payload_length_bytes);
Errors & Warnings
- cannot pass unsafe pointer as safe pointer without explicit cast
- incompatible type for argument 1 of `safememset'
Combination 2
#define bzero(a, b) _safe_memset((char * alias) a, 0, b)
bzero((uint8_t *)message_info->payload.value8, message_info->payload_length_bytes);
Errors & Warnings
- expected ')'
- implicit declaration of function '_safe_memset' is invalid in C99 [-Wimplicit-function-declaration]
Combination 3
No #define
safememset((uint8_t *)message_info->payload.value8, 0, message_info->payload_length_bytes);
Errors & Warnings
- cannot pass unsafe pointer as safe pointer without explicit cast
- incompatible type for argument 1 of `safememset'
Combination 4
No #define
_safe_memset((char * alias) message_info->payload.value8, 0, message_info->payload_length_bytes);
Errors & Warnings
- expected ')'
- implicit declaration of function '_safe_memset' is invalid in C99 [-Wimplicit-function-declaration]