/in/foo.c: In function 'main':
/in/foo.c:9:3: error: 's' undeclared (first use in this function)
   s[i]=-1;
   ^
/in/foo.c:9:3: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:16:13: error: lvalue required as decrement operand
  while((M-1)--){
             ^~
/in/foo.c:24:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=4;break;
        ^~
/in/foo.c:24:30: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
        if(read[0]==2) s[i]=4;break;
                              ^~~~~
/in/foo.c:27:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=5;break;
        ^~
/in/foo.c:27:30: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
        if(read[0]==2) s[i]=5;break;
                              ^~~~~
/in/foo.c:30:8: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
        if(read[0]==2) s[i]=2;break;
        ^~
/in/foo.c:30:30: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
        if(read[0]==2) s[i]=2;break;
                              ^~~~~