auto declaration & compiler warning "no function return"
    Brad Roberts 
    braddr at puremagic.com
       
    Sun Mar  5 15:01:25 PST 2006
    
    
  
On Sun, 5 Mar 2006, akcom wrote:
> 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
I'm fairly sure this is a dup of:
  http://d.puremagic.com/bugzilla/show_bug.cgi?id=5
I've got a potential patch for it in the bug which I just reassigned to 
walter.
Later,
Brad
    
    
More information about the Digitalmars-d-bugs
mailing list