auto declaration & compiler warning "no function return"
akcom
CppCoder at gmail.com
Sun Mar 5 13:02:26 PST 2006
private void onRead()
{
...
auto InternetHost ih = new InternetHost();
if ( ih.getHostByAddr( ia.addr() ) )
{
//remember to delete this!!
hostName = ih.name.dup;
}
else
{
hostName = "unknown";
}
...
return true;
}
compiler gives the following: "warning - peer.d(342): function
akp2p.peer.Peer.onRead no return at end of function"
but when I remove the "auto" from the ih declaration, everything
compiles as expected
More information about the Digitalmars-d-bugs
mailing list