/in/foo.cc: In member function 'int LinkList::operator[](int)':
/in/foo.cc:106:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:47:37: warning: 'L2.LinkList::head' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (Node* p = head; p != NULL; p = p->next)
~~^~~~~~~~~
/in/foo.cc:121:11: note: 'L2.LinkList::head' was declared here
LinkList L2(L1);
^~
/in/foo.cc:77:15: warning: 'L2.LinkList::tail' may be used uninitialized in this function [-Wmaybe-uninitialized]
tail->next = newp;
~~~~~~~~~~~^~~~~~
/in/foo.cc:121:11: note: 'L2.LinkList::tail' was declared here
LinkList L2(L1);
^~