MISRA C:2012 Dir-1.1(Required)

0180 [C99] Use of ll for conversion specifier.

'll' long long 是 C99特性,C90不支持

/*PRQA S 336,602,1027,1278,1307,2017,2211,3122,3408,3447,3602,3625 ++*/

#include <stdio.h>

extern long long          sla;
extern unsigned long long ula;

extern void foo(void)
{
  (void)scanf("Lets input the values! %lld %llu", &sla, &ula);  /* Message 0180 and 0180 */
  (void)printf("Lets output the values! %lld %llu", sla, ula);  /* Message 0180 and 0180 */
}

0202  [I] '-' character in '[]' conversion specification is implementation defined.

#include <stdio.h>

extern void foo(char *cptr)
{
    scanf("Total %[a-z]", cptr);                /* Message 0202 */
}
Any implementation-defined behaviour on which the output of the program depends shall be documented and understood


猜你喜欢

转载自www.cnblogs.com/focus-z/p/11435220.html