id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6762,missing return value in function,edwinchenloo@…,viboes,"In the Chrono library gcc caught this: ./boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp:218: warning: control reaches end of non-void function Which is a valid compiler error: {{{ #!python 197 process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT 198 { 199 tms tm; 200 clock_t c = ::times( &tm ); 201 if ( c == clock_t(-1) ) // error 202 { 203 BOOST_ASSERT(0 && ""Boost::Chrono - Internal Error""); 204 return time_point(); 205 } 206 else 207 { 208 if ( chrono_detail::tick_factor() != -1 ) 209 { 210 return time_point( 211 microseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor())); 212 } 213 else 214 { 215 BOOST_ASSERT(0 && ""Boost::Chrono - Internal Error""); 216 } 217 } 218 } }}} Apparently the last else condition ought to not occur at runtime. If so, something like this would be better: {{{ #!python 197 process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT 198 { 199 tms tm; 200 clock_t c = ::times( &tm ); 201 if ( c == clock_t(-1) ) // error 202 { 203 BOOST_ASSERT(0 && ""Boost::Chrono - Internal Error""); 204 return time_point(); 205 } 206 else 207 { 208 BOOST_ASSERT( chrono_detail::tick_factor() != -1 ); 209 } 210 return time_point( 211 microseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor())); 212 } }}}",Patches,closed,Boost 1.50.0,chrono,Boost 1.49.0,Problem,fixed,chrono warning end non-void,