[Bf-blender-cvs] [61df9fdb2f] blender2.8: Cleanup: warnings

Campbell Barton noreply at git.blender.org
Wed Feb 8 17:34:08 CET 2017


Commit: 61df9fdb2f74cf035013a62f1b0d01246040fae5
Author: Campbell Barton
Date:   Thu Feb 9 02:28:55 2017 +1100
Branches: blender2.8
https://developer.blender.org/rB61df9fdb2f74cf035013a62f1b0d01246040fae5

Cleanup: warnings

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

M	source/blender/blenfont/intern/blf.c
M	source/blender/editors/space_action/action_draw.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/gpu/gawain/immediate.c
M	source/blender/gpu/gawain/vertex_buffer.c
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/gpu/intern/gpu_matrix.c
M	source/blender/render/intern/source/voxeldata.c

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

diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 04b6eb0ad3..7133c34061 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -175,7 +175,7 @@ void BLF_default_set(int fontid)
 	}
 }
 
-int BLF_default()
+int BLF_default(void)
 {
 	ASSERT_DEFAULT_SET;
 	return global_font_default;
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index feea9cf5b1..111b39fe96 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -259,11 +259,11 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
 							bActionGroup *agrp = ale->data;
 							if (show_group_colors && agrp->customCol) {
 								if (sel) {
-									unsigned char *cp = agrp->cs.select;
+									char *cp = agrp->cs.select;
 									immUniformColor4ub(cp[0], cp[1], cp[2], 0x45);
 								}
 								else {
-									unsigned char *cp = agrp->cs.solid;
+									char *cp = agrp->cs.solid;
 									immUniformColor4ub(cp[0], cp[1], cp[2], 0x1D);
 								}
 							}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 1a65608b7b..1ac4f1529e 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2098,7 +2098,7 @@ static void view3d_draw_view(const bContext *C, ARegion *ar, DrawData *draw_data
 #endif
 }
 
-static void view3d_render_pass(const bContext *C, ARegion *ar)
+static void view3d_render_pass(const bContext *C, ARegion *UNUSED(ar))
 {
 	Scene *scene = CTX_data_scene(C);
 	RenderEngineType *type = RE_engines_find(scene->r.engine); /* In the future we should get that from Layers */
diff --git a/source/blender/gpu/gawain/immediate.c b/source/blender/gpu/gawain/immediate.c
index 03e16ca248..08d85c40e9 100644
--- a/source/blender/gpu/gawain/immediate.c
+++ b/source/blender/gpu/gawain/immediate.c
@@ -54,7 +54,7 @@ typedef struct {
 static PER_THREAD bool initialized = false;
 static PER_THREAD Immediate imm;
 
-void immInit()
+void immInit(void)
 	{
 #if TRUST_NO_ONE
 	assert(!initialized);
@@ -80,7 +80,7 @@ void immInit()
 	immActivate();
 	}
 
-void immActivate()
+void immActivate(void)
 	{
 #if TRUST_NO_ONE
 	assert(initialized);
@@ -91,7 +91,7 @@ void immActivate()
 	imm.vao_id = vao_id_alloc();
 	}
 
-void immDeactivate()
+void immDeactivate(void)
 	{
 #if TRUST_NO_ONE
 	assert(initialized);
@@ -104,14 +104,14 @@ void immDeactivate()
 	imm.prev_enabled_attrib_bits = 0;
 	}
 
-void immDestroy()
+void immDestroy(void)
 	{
 	immDeactivate();
 	buffer_id_free(imm.vbo_id);
 	initialized = false;
 	}
 
-VertexFormat* immVertexFormat()
+VertexFormat* immVertexFormat(void)
 	{
 	VertexFormat_clear(&imm.vertex_format);
 	return &imm.vertex_format;
@@ -134,7 +134,7 @@ void immBindProgram(GLuint program)
 	gpuBindMatrices(program);
 	}
 
-void immUnbindProgram()
+void immUnbindProgram(void)
 	{
 #if TRUST_NO_ONE
 	assert(imm.bound_program != 0);
@@ -339,7 +339,7 @@ static void immDrawSetup(void)
 		gpuBindMatrices(imm.bound_program);
 	}
 
-void immEnd()
+void immEnd(void)
 	{
 #if TRUST_NO_ONE
 	assert(imm.prim_type != PRIM_NONE); // make sure we're between a Begin/End pair
diff --git a/source/blender/gpu/gawain/vertex_buffer.c b/source/blender/gpu/gawain/vertex_buffer.c
index 5f2da60067..827703403e 100644
--- a/source/blender/gpu/gawain/vertex_buffer.c
+++ b/source/blender/gpu/gawain/vertex_buffer.c
@@ -16,7 +16,7 @@
 
 #define KEEP_SINGLE_COPY 1
 
-VertexBuffer* VertexBuffer_create()
+VertexBuffer* VertexBuffer_create(void)
 	{
 	VertexBuffer* verts = malloc(sizeof(VertexBuffer));
 	VertexBuffer_init(verts);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index c2b3207dfa..1fb1e23931 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -2318,7 +2318,7 @@ void GPU_state_init(void)
 	GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
 }
 
-void GPU_enable_program_point_size()
+void GPU_enable_program_point_size(void)
 {
 #ifdef __APPLE__
 	/* TODO: remove this when we switch to core profile */
@@ -2328,7 +2328,7 @@ void GPU_enable_program_point_size()
 #endif
 }
 
-void GPU_disable_program_point_size()
+void GPU_disable_program_point_size(void)
 {
 #ifdef __APPLE__
 	/* TODO: remove this when we switch to core profile */
diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index ba84d3d7e0..855ccaa499 100644
--- a/source/blender/gpu/intern/gpu_matrix.c
+++ b/source/blender/gpu/intern/gpu_matrix.c
@@ -70,12 +70,12 @@ static MatrixState state; /* TODO(merwin): make part of GPUContext, alongside im
 #define Projection3D state.ProjectionMatrix3D
 #define Projection2D state.ProjectionMatrix2D
 
-void gpuMatrixInit()
+void gpuMatrixInit(void)
 {
 	memset(&state, 0, sizeof(MatrixState));
 }
 
-void gpuMatrixBegin2D()
+void gpuMatrixBegin2D(void)
 {
 	state.mode = MATRIX_MODE_2D;
 	state.top = 0;
@@ -83,7 +83,7 @@ void gpuMatrixBegin2D()
 	gpuOrtho2D(-1.0f, +1.0f, -1.0f, +1.0f); // or identity?
 }
 
-void gpuMatrixBegin3D()
+void gpuMatrixBegin3D(void)
 {
 	state.mode = MATRIX_MODE_3D;
 	state.top = 0;
@@ -92,7 +92,7 @@ void gpuMatrixBegin3D()
 }
 
 #if SUPPORT_LEGACY_MATRIX
-void gpuMatrixBegin3D_legacy()
+void gpuMatrixBegin3D_legacy(void)
 {
 	/* copy top matrix from each legacy stack into new fresh stack */
 	state.mode = MATRIX_MODE_3D;
@@ -103,7 +103,7 @@ void gpuMatrixBegin3D_legacy()
 }
 #endif
 
-void gpuMatrixEnd()
+void gpuMatrixEnd(void)
 {
 	state.mode = MATRIX_MODE_INACTIVE;
 }
@@ -133,7 +133,7 @@ static void checkmat(cosnt float *m)
 #endif
 
 
-void gpuPushMatrix()
+void gpuPushMatrix(void)
 {
 	BLI_assert(state.mode != MATRIX_MODE_INACTIVE);
 	BLI_assert(state.top < MATRIX_STACK_DEPTH);
@@ -144,7 +144,7 @@ void gpuPushMatrix()
 		copy_m3_m3(ModelView2D, state.ModelViewStack2D[state.top - 1]);
 }
 
-void gpuPopMatrix()
+void gpuPopMatrix(void)
 {
 	BLI_assert(state.mode != MATRIX_MODE_INACTIVE);
 	BLI_assert(state.top > 0);
@@ -168,7 +168,7 @@ void gpuLoadMatrix2D(const float m[3][3])
 	state.dirty = true;
 }
 
-void gpuLoadIdentity()
+void gpuLoadIdentity(void)
 {
 	switch (state.mode) {
 		case MATRIX_MODE_3D:
@@ -622,7 +622,7 @@ const float *gpuGetNormalMatrix(float m[3][3])
 		m = temp3;
 	}
 
-	copy_m3_m4(m, gpuGetModelViewMatrix3D(NULL));
+	copy_m3_m4(m, (const float (*)[4])gpuGetModelViewMatrix3D(NULL));
 
 	invert_m3(m);
 	transpose_m3(m);
@@ -695,13 +695,13 @@ void gpuBindMatrices(GLuint program)
 	state.dirty = false;
 }
 
-bool gpuMatricesDirty()
+bool gpuMatricesDirty(void)
 {
 	return state.dirty;
 }
 
 #if SUPPORT_LEGACY_MATRIX
-void gpuMatrixUpdate_legacy()
+void gpuMatrixUpdate_legacy(void)
 {
 	BLI_assert(state.mode == MATRIX_MODE_INACTIVE);
 	state.dirty = true;
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 6dbcf474e7..1022aeeec6 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -361,6 +361,7 @@ static void init_frame_smoke(VoxelData *vd, int cfra)
 
 #else // WITH_SMOKE
 	(void)vd;
+	(void)cfra;
 
 	vd->dataset = NULL;
 #endif




More information about the Bf-blender-cvs mailing list