Rule M10.1.1 - 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: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17) +---- Forum: 6.10 Arithmetic Type Conversions (https://forum.misra.org.uk/forumdisplay.php?fid=37) +---- Thread: Rule M10.1.1 (/showthread.php?tid=1520) |
Rule M10.1.1 - phdenis - 05-12-2019 Hello, I've a problem when using the memset function, the error M10.1.1 is raised. Error raised by the MISRA Tool used (RTRT): line 12 row 30: Rule M10.1.1 Error: Implicit conversion of an integer expression to a different signedness is not allowed Regarding the memset prototype, void *memset (void *s, int c, size_t n); The content of the test.h file is given see below: Code: #ifndef __TEST_H__ The content of the test.c file is given see below: Code: #include "test.h" Re: Rule M10.1.1 - phdenis - 05-12-2019 I've found the problem, the 2nd parameter of memset is a int and not unsigned int. Then by deleting the U for the constant everything is OK now. Thanks anyway Phil |