/in/foo.cc: In function 'int turn(int, int, int)':
/in/foo.cc:25:9: warning: 'new_dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
return new_dir;
^~~~~~~
/in/foo.cc: In function 'std::pair<int, int> next(int, int, int)':
/in/foo.cc:28:9: warning: 'ty' may be used uninitialized in this function [-Wmaybe-uninitialized]
int tx,ty,minl;
^~
/in/foo.cc:28:6: warning: 'tx' may be used uninitialized in this function [-Wmaybe-uninitialized]
int tx,ty,minl;
^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:74:29: warning: 'new_dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
t+=abs(nx-x),x=nx,y=ny,dir=turn(x,y,dir);
~~~^~~~~~~~~~~~~~