|
|
@ -6,6 +6,7 @@
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
|
|
void modulo_signed_Bad(int i) {
|
|
|
|
void modulo_signed_Bad(int i) {
|
|
|
|
char arr[5];
|
|
|
|
char arr[5];
|
|
|
@ -44,6 +45,11 @@ void modulo_unsigned_Good(unsigned int i) {
|
|
|
|
arr[i % 5] = 123;
|
|
|
|
arr[i % 5] = 123;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void modulo_unsigned_short_Good(uint16_t i) {
|
|
|
|
|
|
|
|
char arr[5];
|
|
|
|
|
|
|
|
arr[i % 5] = 123;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void modulo_signed_var_Bad_FN(unsigned int len, int i) {
|
|
|
|
void modulo_signed_var_Bad_FN(unsigned int len, int i) {
|
|
|
|
char arr[len];
|
|
|
|
char arr[len];
|
|
|
|
arr[i % len] = 123;
|
|
|
|
arr[i % len] = 123;
|
|
|
|