rosenberg: strip away some casting (eliminates a false positive)
[smatch.git] / validation / sm_compare13.c
blob150ef2c96e1602328283086742d45894ee71ddde
1 #include <stdio.h>
2 #include <string.h>
3 #include "check_debug.h"
5 int cmp_x(int x, int y)
7 if (x < y) {
8 __smatch_compare(x, y);
9 return -1;
11 if (x == y) {
12 __smatch_compare(x, y);
13 return 0;
15 __smatch_compare(x, y);
16 return 1;
20 * check-name: smatch compare #13
21 * check-command: smatch -I.. sm_compare13.c
23 * check-output-start
24 sm_compare13.c:8 cmp_x() x < y
25 sm_compare13.c:12 cmp_x() x == y
26 sm_compare13.c:15 cmp_x() x > y
27 * check-output-end