clear_buffer: delete an unused function
[smatch.git] / validation / backend / sum.c
blobc9451d4bc9518373aa13e905971701411fc288e8
1 #include <stdio.h>
2 #include <stdlib.h>
4 static int sum(int n)
6 int i, result = 0;
8 for (i = 1; i <= n; ++i)
9 result += i;
10 return result;
13 int main(int argc, char **argv)
15 printf("%d\n", sum(5));
16 printf("%d\n", sum(100));
17 return 0;
21 * check-name: sum from 1 to n
22 * check-command: ./sparsei $file
24 * check-output-start
26 5050
27 * check-output-end