[Bf-blender-cvs] [562d6ee] GPU_data_request: fix compiler warnings (gcc 4.9)

Mike Erwin noreply at git.blender.org
Wed Apr 22 04:01:59 CEST 2015


Commit: 562d6ee7c419b243006285fd9744f33021fca067
Author: Mike Erwin
Date:   Tue Apr 21 22:01:44 2015 -0400
Branches: GPU_data_request
https://developer.blender.org/rB562d6ee7c419b243006285fd9744f33021fca067

fix compiler warnings (gcc 4.9)

===================================================================

M	source/blender/gpu/intern/gpux_buffer_id.c
M	source/blender/gpu/intern/gpux_buffer_id.h

===================================================================

diff --git a/source/blender/gpu/intern/gpux_buffer_id.c b/source/blender/gpu/intern/gpux_buffer_id.c
index 1f073ec..bf8062f 100644
--- a/source/blender/gpu/intern/gpux_buffer_id.c
+++ b/source/blender/gpu/intern/gpux_buffer_id.c
@@ -20,10 +20,10 @@ static ThreadMutex orphan_mutex = BLI_MUTEX_INITIALIZER;
 
 GLuint buffer_id_alloc()
 {
-	BLI_assert(BLI_thread_is_main());
-
 	GLuint new_buffer_id;
 
+	BLI_assert(BLI_thread_is_main());
+
 	/* delete orphaned IDs */
 	BLI_mutex_lock(&orphan_mutex);
 	if (orphaned_buffer_ct) {
@@ -58,10 +58,10 @@ void buffer_id_free(GLuint buffer_id)
 
 GLuint vao_id_alloc()
 {
-	BLI_assert(BLI_thread_is_main());
-
 	GLuint new_vao_id;
 
+	BLI_assert(BLI_thread_is_main());
+
 	/* delete orphaned IDs */
 	BLI_mutex_lock(&orphan_mutex);
 	if (orphaned_vao_ct) {
diff --git a/source/blender/gpu/intern/gpux_buffer_id.h b/source/blender/gpu/intern/gpux_buffer_id.h
index c6bf185..edd5851 100644
--- a/source/blender/gpu/intern/gpux_buffer_id.h
+++ b/source/blender/gpu/intern/gpux_buffer_id.h
@@ -10,10 +10,10 @@
 
 #include "GPU_glew.h"
 
-GLuint buffer_id_alloc();
+GLuint buffer_id_alloc(void);
 void buffer_id_free(GLuint buffer_id);
 
-GLuint vao_id_alloc();
+GLuint vao_id_alloc(void);
 void vao_id_free(GLuint vao_id);
 
 #endif /* BLENDER_GL_BUFFER_ID */




More information about the Bf-blender-cvs mailing list