diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-03-21 16:43:43 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-03-21 15:19:52 +0000 |
commit | 002bb76d8c8c0c3188d9ce83888cde883627a629 (patch) | |
tree | a3dfc893ecc8ca99c3d9cae6fbebf97abfe227d8 /src/3rdparty | |
parent | f837692f5b8579125335624ea7228a4edb5897b5 (diff) |
assimp: Fix build FBXConverter.
If you compile according to https://wiki.qt.io/Qt5ForAndroidBuilding
with NDK v11.b, you get such warning and the compilation stops:
FBXConverter.cpp:1262:19: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized]
unsigned int count;
Change-Id: Ieff61e6302800a22080f837267982fd2ea3129e6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/assimp/code/FBXConverter.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/patches/0005-assimp-Fix-build-FBXConverter.patch | 35 |
2 files changed, 36 insertions, 1 deletions
diff --git a/src/3rdparty/assimp/code/FBXConverter.cpp b/src/3rdparty/assimp/code/FBXConverter.cpp index 56643bccc..c6ef8c908 100644 --- a/src/3rdparty/assimp/code/FBXConverter.cpp +++ b/src/3rdparty/assimp/code/FBXConverter.cpp @@ -1259,7 +1259,7 @@ private: // taking notes so we don't need to do it twice. BOOST_FOREACH(WeightIndexArray::value_type index, indices) { - unsigned int count; + unsigned int count = 0; const unsigned int* const out_idx = geo.ToOutputVertexIndex(index, count); index_out_indices.push_back(no_index_sentinel); diff --git a/src/3rdparty/patches/0005-assimp-Fix-build-FBXConverter.patch b/src/3rdparty/patches/0005-assimp-Fix-build-FBXConverter.patch new file mode 100644 index 000000000..9290b30aa --- /dev/null +++ b/src/3rdparty/patches/0005-assimp-Fix-build-FBXConverter.patch @@ -0,0 +1,35 @@ +From 1e39e6b296b94852e73adea1cb652adda435529e Mon Sep 17 00:00:00 2001 +From: Anton Kudryavtsev <a.kudryavtsev@netris.ru> +Date: Mon, 21 Mar 2016 16:43:43 +0300 +Subject: [PATCH] assimp: Fix build FBXConverter. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If you compile according to https://wiki.qt.io/Qt5ForAndroidBuilding +with NDK v11.b, you get such warning and the compilation stops: + +FBXConverter.cpp:1262:19: warning: ‘count’ may be used uninitialized in this function [-Wmaybe-uninitialized] + unsigned int count; + +Change-Id: Ieff61e6302800a22080f837267982fd2ea3129e6 +--- + src/3rdparty/assimp/code/FBXConverter.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/3rdparty/assimp/code/FBXConverter.cpp b/src/3rdparty/assimp/code/FBXConverter.cpp +index 56643bc..c6ef8c9 100644 +--- a/src/3rdparty/assimp/code/FBXConverter.cpp ++++ b/src/3rdparty/assimp/code/FBXConverter.cpp +@@ -1259,7 +1259,7 @@ private: + // taking notes so we don't need to do it twice. + BOOST_FOREACH(WeightIndexArray::value_type index, indices) { + +- unsigned int count; ++ unsigned int count = 0; + const unsigned int* const out_idx = geo.ToOutputVertexIndex(index, count); + + index_out_indices.push_back(no_index_sentinel); +-- +1.9.1 + |