05-07-2018, 04:58 AM
From ISO C standard:
So, no error information to test and hence no violation of 16.10.
If you upgrade to MISRA C 2012 you can use this explicit exception for function return values:
I did not find a corresponding entry in the obsolete 2004 standard.
Quote:The strncpy function returns the value of s1.
So, no error information to test and hence no violation of 16.10.
If you upgrade to MISRA C 2012 you can use this explicit exception for function return values:
Code:
(void)strncpy(MyStr1,MyConstStr, sizeof(MyConstStr);
I did not find a corresponding entry in the obsolete 2004 standard.
<t></t>