Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2017-02-07 21:49:50 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-02-11 02:18:36 +0300
commit3f9f82f3c45e9889ae00636ef41d9dc49cad4d83 (patch)
tree701b69afa97b2865af27d97f2241f670b0f92a05
parent8add4cc900b4d6c8fe66d09b1563bc48b3b7be32 (diff)
fix clang warning
uninitialized variable (glGen functions set the value)
-rw-r--r--source/blender/gpu/gawain/buffer_id.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/gpu/gawain/buffer_id.cpp b/source/blender/gpu/gawain/buffer_id.cpp
index a7b8d7a394a..450656c4ebf 100644
--- a/source/blender/gpu/gawain/buffer_id.cpp
+++ b/source/blender/gpu/gawain/buffer_id.cpp
@@ -53,7 +53,7 @@ GLuint buffer_id_alloc()
}
orphan_mutex.unlock();
- GLuint new_buffer_id;
+ GLuint new_buffer_id = 0;
glGenBuffers(1, &new_buffer_id);
return new_buffer_id;
}
@@ -80,8 +80,6 @@ GLuint vao_id_alloc()
assert(thread_is_main());
#endif
- GLuint new_vao_id;
-
// delete orphaned IDs
orphan_mutex.lock();
if (!orphaned_vao_ids.empty())
@@ -95,6 +93,7 @@ GLuint vao_id_alloc()
}
orphan_mutex.unlock();
+ GLuint new_vao_id = 0;
glGenVertexArrays(1, &new_vao_id);
return new_vao_id;
}