/in/foo.cc: In function 'int main()':
/in/foo.cc:130:9: warning: 'lastdis' may be used uninitialized in this function [-Wmaybe-uninitialized]
addedge(root, end, lastdis);
~~~~~~~^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:47:53: warning: 'ed' may be used uninitialized in this function [-Wmaybe-uninitialized]
to[edges] = u; wei[edges] = w; next[edges] = head[v];
~~~~~~^
/in/foo.cc:21:13: note: 'ed' was declared here
#define end ed
^
/in/foo.cc:105:12: note: in expansion of macro 'end'
int root, end, lastdis;
^~~
/in/foo.cc:132:21: warning: 'rt' may be used uninitialized in this function [-Wmaybe-uninitialized]
for(int u = end; u != root; u = fa[u])
^