diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-02 11:32:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-03 17:33:12 +0300 |
commit | e684e0ec959f47402e1de4d6dde2551901a2d89d (patch) | |
tree | b284957d5e49e166467c688ad9a9dab9a466b904 /source/blender/blenkernel | |
parent | bb92edd1c802b521d766f46bf09b7e4b352f8398 (diff) |
Cleanup: fix warnings, removed unused code.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c index c26112d3724..c1a4f8dba53 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c @@ -232,6 +232,9 @@ bool ccgSubSurf_prepareGLMesh(CCGSubSurf *ss, CHECK_COMPUTE_TYPE(CUDA) CHECK_COMPUTE_TYPE(GLSL_TRANSFORM_FEEDBACK) CHECK_COMPUTE_TYPE(GLSL_COMPUTE) + default: + compute_type = OPENSUBDIV_EVALUATOR_CPU; + break; #undef CHECK_COMPUTE_TYPE } @@ -739,7 +742,7 @@ static void opensubdiv_evaluateNGonFaceGrids(CCGSubSurf *ss, /* Evaluate edges. */ for (S = 0; S < face->numVerts; S++) { CCGEdge *edge = FACE_getEdges(face)[S]; - int x, S0, S1; + int x, S0 = 0, S1 = 0; bool flip; for (x = 0; x < face->numVerts; ++x) { diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 5545eba8764..34b185417e3 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1022,7 +1022,7 @@ makebreak: /* top and top-baseline are the same when text-boxes are used */ if (cu->align_y != CU_ALIGN_Y_TOP && i_textbox < slen) { /* all previous textboxes are 'full', only align the last used text-box */ - float yoff; + float yoff = 0.0f; int lines; struct CharTrans *ct_last, *ct_textbox; @@ -1051,7 +1051,7 @@ makebreak: else { /* non text-box case handled separately */ ct = chartransdata; - float yoff; + float yoff = 0.0f; if (cu->align_y == CU_ALIGN_Y_TOP) { yoff = -linedist; |