diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-02-08 18:28:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-02-08 18:39:31 +0300 |
commit | 61df9fdb2f74cf035013a62f1b0d01246040fae5 (patch) | |
tree | 7cb101adb4e25369cf458ec121d3f9b37bdd4ada | |
parent | 2a16a4ee433c155a81d41c69c2fd21668cbb3564 (diff) |
Cleanup: warnings
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_action/action_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/gawain/immediate.c | 14 | ||||
-rw-r--r-- | source/blender/gpu/gawain/vertex_buffer.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.c | 22 | ||||
-rw-r--r-- | source/blender/render/intern/source/voxeldata.c | 1 |
8 files changed, 26 insertions, 25 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 04b6eb0ad39..7133c340617 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 feea9cf5b13..111b39fe96c 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 1a65608b7b4..1ac4f1529e3 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 03e16ca248e..08d85c40e90 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 5f2da60067d..827703403e3 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 c2b3207dfa3..1fb1e239310 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 ba84d3d7e0b..855ccaa4999 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 6dbcf474e77..1022aeeec66 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 |