I'm porting a C codebase for a new project and am getting errors, mostly related to pointers, that I am having a difficult time dealing with.
I understand xC needs the extra annotations for memory safety, and I've done this before in other programs. Here are some examples of the problems I'm encountering:
1. In this C stack there are header files that often have something like:
Code: Select all
char * allocate_string ( write_info_t * message_info, raw_offset_t * offset, const char * string );
2. Other errors are things like "pointer cast discards const qualifier" and "cannot convert non-pointer to pointer type" and "void * pointer must be declared as unsafe". Again, any attempt to rectify this with the xC annotations results in syntax errors.
What am I missing?