foo.cc: In function 'int monthday(int, int)':
foo.cc:42:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
foo.cc:47:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   return day;
   ^~~~~~
foo.cc: In function 'int main()':
foo.cc:59:7: warning: 'sum' may be used uninitialized in this function [-Wmaybe-uninitialized]
    sum=sum+day ; 
    ~~~^~~~~~~~
foo.cc:53:7: note: 'sum' was declared here
   int sum;
       ^~~
foo.cc: In function 'int godays(int, int, int)':
foo.cc:59:7: warning: 'sum' may be used uninitialized in this function [-Wmaybe-uninitialized]
    sum=sum+day ; 
    ~~~^~~~~~~~