Provide default return values for unreachable code paths.

TRAC #11414 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@24 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c7d8a935
...@@ -263,7 +263,7 @@ std::size_t VertexDataManager::typeSize(GLenum type) const ...@@ -263,7 +263,7 @@ std::size_t VertexDataManager::typeSize(GLenum type) const
case GL_SHORT: case GL_UNSIGNED_SHORT: return sizeof(GLshort); case GL_SHORT: case GL_UNSIGNED_SHORT: return sizeof(GLshort);
case GL_FIXED: return sizeof(GLfixed); case GL_FIXED: return sizeof(GLfixed);
case GL_FLOAT: return sizeof(GLfloat); case GL_FLOAT: return sizeof(GLfloat);
default: UNREACHABLE(); default: UNREACHABLE(); return sizeof(GLfloat);
} }
} }
......
...@@ -46,7 +46,7 @@ class FormatConverterFactory ...@@ -46,7 +46,7 @@ class FormatConverterFactory
case 2: return getFormatConverterForSize<2>(); case 2: return getFormatConverterForSize<2>();
case 3: return getFormatConverterForSize<3>(); case 3: return getFormatConverterForSize<3>();
case 4: return getFormatConverterForSize<4>(); case 4: return getFormatConverterForSize<4>();
default: UNREACHABLE(); default: UNREACHABLE(); return getFormatConverterForSize<1>();
} }
} }
}; };
...@@ -140,7 +140,7 @@ FormatConverter Dx9BackEnd::getFormatConverter(GLenum type, std::size_t size, bo ...@@ -140,7 +140,7 @@ FormatConverter Dx9BackEnd::getFormatConverter(GLenum type, std::size_t size, bo
case GL_FLOAT: case GL_FLOAT:
return FormatConverterFactory<float, NoWiden, Identity<float> >::getFormatConverter(size); return FormatConverterFactory<float, NoWiden, Identity<float> >::getFormatConverter(size);
default: UNREACHABLE(); default: UNREACHABLE(); return FormatConverterFactory<float, NoWiden, Identity<float> >::getFormatConverter(1);
} }
} }
...@@ -163,7 +163,9 @@ D3DDECLTYPE Dx9BackEnd::mapAttributeType(GLenum type, std::size_t size, bool nor ...@@ -163,7 +163,9 @@ D3DDECLTYPE Dx9BackEnd::mapAttributeType(GLenum type, std::size_t size, bool nor
case GL_FLOAT: case GL_FLOAT:
return floatTypes[size-1]; return floatTypes[size-1];
default: UNREACHABLE(); default:
UNREACHABLE();
return D3DDECLTYPE_FLOAT1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment