Hi All
I am using IBM C compiler on the mainframe to compile some code that would be published as open source. I have in my program many (over 40)simple function definitions with the purpose of hiding the original function name under a new name (for mainframe related reasons). I have the appropriate 'extern' statements elsewhere in the program. Most cases, but 6, have no problem, but these 6 cause me compile warnings that I do not understand. The errors are of two types. Please see the below:
Code:
int32_t SERIADCD(pcre2_code **codes,
int32_t number_of_codes, const uint32_t *bytes,
pcre2_general_context *gcontext)
{
return pcre2_serialize_decode(codes,
number_of_codes, bytes,
..........................a.......................................
=====> a - CCN3280 Function argument assignment between types "const unsigned char*" and "const unsigned
int*" is not allowed.
gcontext);
}
Could anybody make sense of this warning.
Another type of error is more subtle:
Code:
void MATCHDCR(uint32_t ovecsize,
pcre2_general_context *gcontext)
{
return pcre2_match_data_create(ovecsize,
return pcre2_match_data_create_8(ovecsize,
....................................a...........................................
=====> a - CCN4332 A function with return type "void" may not return a value of type "pointer to an
incomplete type".
gcontext);
}
I'll try to describe the subtle point. Internally all functions are described in macros that add '_8' to the name, but that should not appear in my program and indeed in most cases, this does not happen. Here, I've made a subtle mistake that caused the _8 to appear, but I cannot find that mistake.
As an illustration, I'll show here a function that compile perfectly without any problem:
Code:
int MATCH2(const pcre2_code *code, PCRE2_SPTR subject,
PCRE2_SIZE length, PCRE2_SIZE startoffset,
uint32_t options, pcre2_match_data *match_data,
pcre2_match_context *mcontext)
{
return pcre2_match(code, subject,
length, startoffset,
options, match_data,
mcontext);
}
Thanks
ZA