/in/foo.cc: In function 'int find(int)':
/in/foo.cc:9:8: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
mid=l+r>>1;
~^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:30:8: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
g[i]=find(a[i]);
~~~~^~~~~~~~~~~
/in/foo.cc:9:8: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
mid=l+r>>1;
~^~
/in/foo.cc:7:8: note: 'r' was declared here
int l,r,mid,ret;
^
/in/foo.cc:9:8: warning: 'l' may be used uninitialized in this function [-Wmaybe-uninitialized]
mid=l+r>>1;
~^~
/in/foo.cc:7:6: note: 'l' was declared here
int l,r,mid,ret;
^
/in/foo.cc:22:8: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
f[i]=find(a[i]);
~~~~^~~~~~~~~~~
/in/foo.cc:9:8: warning: 'l' may be used uninitialized in this function [-Wmaybe-uninitialized]
mid=l+r>>1;
~^~
/in/foo.cc:7:6: note: 'l' was declared here
int l,r,mid,ret;
^
/in/foo.cc:9:8: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
mid=l+r>>1;
~^~
/in/foo.cc:7:8: note: 'r' was declared here
int l,r,mid,ret;
^