From 570d02ff6e93e30b5d45d48231e7f7cba5f85162 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 13 Feb 2015 12:37:40 +0200 Subject: [PATCH] Silence more uninitialized variable warnings These are false positives since aiMaterial::Get will have written to output if it returns AI_SUCCESS but the compiler can't see that. --- code/3DSExporter.cpp | 2 +- code/ColladaExporter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp index 8ad367058..1b870181c 100644 --- a/code/3DSExporter.cpp +++ b/code/3DSExporter.cpp @@ -294,7 +294,7 @@ void Discreet3DSExporter::WriteMaterials() WriteColor(color); } - aiShadingMode shading_mode; + aiShadingMode shading_mode = aiShadingMode_Flat; if (mat.Get(AI_MATKEY_SHADING_MODEL, shading_mode) == AI_SUCCESS) { ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_SHADING); diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index d2e85a015..db76e38a9 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -452,7 +452,7 @@ void ColladaExporter::WriteMaterials() } } - aiShadingMode shading; + aiShadingMode shading = aiShadingMode_Flat; materials[a].shading_model = "phong"; if(mat->Get( AI_MATKEY_SHADING_MODEL, shading) == aiReturn_SUCCESS) { if(shading == aiShadingMode_Phong) {