1 #define SIZE 2 2 static int buf[SIZE]; 3 swt(int i)4static inline int swt(int i) 5 { 6 switch (i) { 7 case 0 ... (SIZE-1): 8 return buf[i]; 9 default: 10 return 0; 11 } 12 } 13 switch_ok(void)14static int switch_ok(void) { return swt(1); } switch_ko(void)15static int switch_ko(void) { return swt(2); } 16 17 cbr(int i,int p)18static inline int cbr(int i, int p) 19 { 20 if (p) 21 return buf[i]; 22 else 23 return 0; 24 } 25 branch_ok(int x)26static int branch_ok(int x) { return cbr(1, x != x); } branch_ko(int x)27static int branch_ko(int x) { return cbr(2, x != x); } 28 29 /* 30 * check-name: bad-check-access0 31 */ 32