foo.c: In function 's':
foo.c:4:6: warning: unused variable 'i' [-Wunused-variable]
int i,p,x=0;
^
foo.c: In function 'main':
foo.c:16:10: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
scanf("%d",n);
~^
foo.c: In function 's':
foo.c:12:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
foo.c: In function 'main':
foo.c:16:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",n);
^~~~~~~~~~~~~
foo.c:16:2: warning: 'n' is used uninitialized in this function [-Wuninitialized]
scanf("%d",n);
^~~~~~~~~~~~~