/in/foo.c: In function 'main':
/in/foo.c:4:8: warning: 'main' is normally a non-static function [-Wmain]
{ int main() {
^~~~
/in/foo.c: In function 'main':
/in/foo.c:10:16: warning: implicit declaration of function 'factorial' [-Wimplicit-function-declaration]
sum += factorial(i);
^~~~~~~~~
/in/foo.c:12:12: warning: too many arguments for format [-Wformat-extra-args]
printf("d\n", n, sum);
^~~~~
/in/foo.c: In function 'main':
/in/foo.c:14:1: error: expected declaration or statement at end of input
}
^
At top level:
/in/foo.c:4:8: warning: 'main' defined but not used [-Wunused-function]
{ int main() {
^~~~