From 6c38e2e589f849b6ea9f20e63a8cd52db327d99c Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Sat, 23 Apr 2011 21:23:18 -0500 Subject: [PATCH] Fixed a clang warning: control may reach end of non-void function [-Wreturn-type] (bug 4877, r=dvander). --- public/tier1/bitbuf.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/public/tier1/bitbuf.h b/public/tier1/bitbuf.h index 29a0df02..21c46b1c 100644 --- a/public/tier1/bitbuf.h +++ b/public/tier1/bitbuf.h @@ -1213,20 +1213,26 @@ FORCEINLINE float CBitRead::ReadFloat( void ) #endif FORCEINLINE unsigned int CBitRead::ReadUBitVar( void ) { - switch( ReadUBitLong( 2 ) ) + unsigned int ret = ReadUBitLong( 2 ); + switch( ret ) { case 0: - return ReadUBitLong( 4 ); + ret = ReadUBitLong( 4 ); + break; case 1: - return ReadUBitLong( 8 ); + ret = ReadUBitLong( 8 ); + break; case 2: - return ReadUBitLong( 12 ); + ret = ReadUBitLong( 12 ); + break; case 3: - return ReadUBitLong( 32 ); + ret = ReadUBitLong( 32 ); + break; } + return ret; } #ifdef _WIN32 #pragma warning(pop)