Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » AString::Compare missing explicit return value (q will = 0 if the loop isn't broken. This value should be returned explicitly.)
Re: AString::Compare missing explicit return value [message #44085 is a reply to message #44081] Tue, 23 December 2014 14:53 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi rainbowsally,

There was nothing wrong with the function. If you look carefully, you'll find out that the line you added will actually never be called Wink There is no way the code evaluation could get out of the infinite for-loop, other than one of the first three return statements.

So even though some compilers might warn about missing return statement, there is actually no problem or undefined behavior in this function.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Previous Topic: CbGen not compiling in linux.
Next Topic: Multithreaded Animated GIF
Goto Forum:
  


Current Time: Thu May 09 08:41:07 CEST 2024

Total time taken to generate the page: 0.01820 seconds