Well I made a minimal example to illustrate that there is nothing special going on here and didn't want/can't paste the real code (specially not all of it) but It does the same when the result from strlen() gets written to a local or a global variable.
Well I made a minimal example to illustrate that there is nothing special going on here and didn't want/can't paste the real code (speialy all of it) but It does the same when the result from strlen() gets written to a local or a global variable.
I am using the currently downloadable windows installer version 2.6 and the analysis is set to C99, forced C and Nativ. I have inconclusive errors activated but it is not marked as such.
I am using the currently downloadable windows installer version 2.6 and the analysis is set to C99, forced C and Nativ
I am using the currently downloadable windows installer version 2.6 and and analysis is set to C99, forced C and Nativ
I am using the currently downloadable windows installer version 2.6
The following C code gives me the ignoredReturnValue warning for the strlen() call: #include <string.h> void Foo(SOME_SRUCT_TYPE_t *structVar) { if (strcmp(structVar->text, structVar->otherText) != 0) { structVar->len = (uint8_t)strlen(structVar->text); memcpy(structVar->otherText, structVar->text, (structVar->len + 1)); if (structVar->len > MAX_LEN) { structVar->offset = 0; } } } this does not happen when I remove the casting for the strlen() return value. Sidenote: I would have used the issue tracer...