/in/foo.c: In function 'bfs':
/in/foo.c:46:16: warning: missing braces around initializer [-Wmissing-braces]
int dir[4][2]={-1,0,1,0,0,-1,0,1};
^
/in/foo.c:46:16: note: (near initialization for 'dir')
/in/foo.c: In function 'main':
/in/foo.c:110:22: warning: format '%s' expects argument of type 'char *', but argument 6 has type 'int *' [-Wformat=]
scanf("%d %d %d %d %s",&qx,&qy,&zx,&zy,str);
^
/in/foo.c: In function 'bfs':
/in/foo.c:95:27: warning: 'd2' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(d1>0 || d1<n || d2>0 || d2<m)
~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/in/foo.c:95:11: warning: 'd1' may be used uninitialized in this function [-Wmaybe-uninitialized]
if(d1>0 || d1<n || d2>0 || d2<m)
~~~~~^~~~~~~