Yes, that would seem like a bug, or at least, very bad static analysis on the part of MSVC. I use mostly GCC or Clang, and I have never seen warnings for such code (i.e., if-else with no return afterwards, which is quite common). I'm quite surprised that MSVC (from VS2010) so incompetently produces such a bogus warning (and that's coming from someone who already has a very low opinion of MSVC compilers).
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
rubberman commented: Good answer Mike. +12
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Vasthor commented: great tips, and cleared up the things that I thought about the book, it seems the write doesn't even compile the code s/he wrote. +2
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
ddanbe commented: Thanks for the info +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
rubberman commented: As usual, you give good examples/links! :-) +12
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
cambalinho commented: thanks for all +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
cambalinho commented: thanks for all +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
cambalinho commented: thanks for all +2
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
rubberman commented: Good catch Mike - did't look that far! :-) +12
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Reverend Jim commented: ;-P +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
ddanbe commented: Great! +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
JasonHippy commented: Ooops, I missed that! Good save! +9
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Reverend Jim commented: The new motto would be "don't trust anyone over 500". +0
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Moschops commented: Thanks Mike. This sort of practical knowledge about the tool is always good to know and make me look far for competent at work than I really am. Much appreciated :) +11
Ancient Dragon commented: Great job :) +14
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Paul.Esson commented: Informative ! +4
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
iamthwee commented: Wow +0