![]() |
11.9 and function calls and returned pointers - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4) +--- Forum: MISRA C:2012 and MISRA C:2023 guidelines (https://forum.misra.org.uk/forumdisplay.php?fid=21) +---- Forum: 8.11 Pointer type conversions (https://forum.misra.org.uk/forumdisplay.php?fid=166) +---- Thread: 11.9 and function calls and returned pointers (/showthread.php?tid=1738) |
11.9 and function calls and returned pointers - danielmarjamaki2 - 26-05-2025 Could you please clarify to me if this violates 11.9: Code: int* f1(void) { And does this violate 11.9: Code: void f2(int* ptr); Do you consider returns and function calls to be "assignments" otherwise it seems to me that the Amplification says these are compliant? The last example in the PDF does suggest that function calls should be considered to be "assignments" however there is no non-compliant example code that I can rely on. Thank you |