2017-10-15 16:18:29 +02:00
|
|
|
// To test:
|
|
|
|
// ~/cppcheck/cppcheck --dump cert-test.c && python cert.py -verify cert-test.c.dump
|
|
|
|
|
2017-10-16 13:35:07 +02:00
|
|
|
unsigned char int31(int x) {
|
|
|
|
x = (unsigned char)1000; // cert-INT31-c
|
|
|
|
x = (signed char)0xff; // cert-INT31-c
|
|
|
|
x = (unsigned char)-1; // cert-INT31-c
|
|
|
|
x = (unsigned long long)-1; // cert-INT31-c
|
2017-10-15 16:18:29 +02:00
|
|
|
}
|