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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-11 16:13:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-11 16:13:41 +0400
commit5248ec57d97050f48efdd00d3106016ad4553363 (patch)
tree8ff7a1048854d7636129aa48bfac454649738918
parent71a7fb6286637afa44dad7684f0eae80727a41c1 (diff)
minor fixes
- new compositor could use uninitialized var - profile conversion could use uninitialized var - set better warnings for clang+cmake. - remove picky warnings from sphinx doc gen shell script.
-rw-r--r--CMakeLists.txt14
-rwxr-xr-xdoc/python_api/sphinx_doc_gen.sh2
-rw-r--r--release/scripts/templates/operator_node.py3
-rw-r--r--source/blender/compositor/nodes/COM_MuteNode.cpp61
-rw-r--r--source/blender/imbuf/intern/divers.c20
5 files changed, 62 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 191fb61e1b4..5b70110947b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1605,6 +1605,20 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
endif()
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS C_WARN_ALL -Wall)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+ ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL -Wno-overloaded-virtual) # we get a lot of these, if its a problem a dev needs to look into it.
+ ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
+
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh
index ccb293d7a0e..92461961920 100755
--- a/doc/python_api/sphinx_doc_gen.sh
+++ b/doc/python_api/sphinx_doc_gen.sh
@@ -61,7 +61,7 @@ if $DO_OUT_HTML ; then
# annoying bug in sphinx makes it very slow unless we do this. should report.
cd $SPHINXBASE
- sphinx-build -n -b html sphinx-in sphinx-out
+ sphinx-build -b html sphinx-in sphinx-out
# XXX, saves space on upload and zip, should move HTML outside
# and zip up there, for now this is OK
diff --git a/release/scripts/templates/operator_node.py b/release/scripts/templates/operator_node.py
index bed2a1300a4..5962651995b 100644
--- a/release/scripts/templates/operator_node.py
+++ b/release/scripts/templates/operator_node.py
@@ -1,5 +1,6 @@
import bpy
+
def main(operator, context):
space = context.space_data
node_tree = space.node_tree
@@ -14,7 +15,7 @@ def main(operator, context):
return
node_other, = node_selected
-
+
# now we have 2 nodes to operate on
if not node_active.inputs:
operator.report({'ERROR'}, "Active node has no inputs")
diff --git a/source/blender/compositor/nodes/COM_MuteNode.cpp b/source/blender/compositor/nodes/COM_MuteNode.cpp
index 72303a4d6ee..d02eb2a0b98 100644
--- a/source/blender/compositor/nodes/COM_MuteNode.cpp
+++ b/source/blender/compositor/nodes/COM_MuteNode.cpp
@@ -44,37 +44,38 @@ void MuteNode::reconnect(ExecutionSystem * graph, OutputSocket * output)
}
}
- NodeOperation * operation;
+ NodeOperation *operation;
switch (output->getDataType()) {
- case COM_DT_VALUE:
- {
- SetValueOperation *valueoperation = new SetValueOperation();
- valueoperation->setValue(0.0f);
- operation = valueoperation;
- break;
- }
- case COM_DT_VECTOR:
- {
- SetVectorOperation *vectoroperation = new SetVectorOperation();
- vectoroperation->setX(0.0f);
- vectoroperation->setY(0.0f);
- vectoroperation->setW(0.0f);
- operation = vectoroperation;
- break;
- }
- case COM_DT_COLOR:
- {
- SetColorOperation *coloroperation = new SetColorOperation();
- coloroperation->setChannel1(0.0f);
- coloroperation->setChannel2(0.0f);
- coloroperation->setChannel3(0.0f);
- coloroperation->setChannel4(0.0f);
- operation = coloroperation;
- break;
- }
- /* quiet warnings */
- case COM_DT_UNKNOWN:
- break;
+ case COM_DT_VALUE:
+ {
+ SetValueOperation *valueoperation = new SetValueOperation();
+ valueoperation->setValue(0.0f);
+ operation = valueoperation;
+ break;
+ }
+ case COM_DT_VECTOR:
+ {
+ SetVectorOperation *vectoroperation = new SetVectorOperation();
+ vectoroperation->setX(0.0f);
+ vectoroperation->setY(0.0f);
+ vectoroperation->setW(0.0f);
+ operation = vectoroperation;
+ break;
+ }
+ case COM_DT_COLOR:
+ {
+ SetColorOperation *coloroperation = new SetColorOperation();
+ coloroperation->setChannel1(0.0f);
+ coloroperation->setChannel2(0.0f);
+ coloroperation->setChannel3(0.0f);
+ coloroperation->setChannel4(0.0f);
+ operation = coloroperation;
+ break;
+ }
+ /* quiet warnings */
+ case COM_DT_UNKNOWN:
+ operation = NULL;
+ break;
}
if (operation) {
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 279fd5d59be..1b68c520336 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -538,12 +538,16 @@ void IMB_rect_from_float(ImBuf *ibuf)
imb_addrectImBuf(ibuf);
/* determine profiles */
- if (ibuf->profile == IB_PROFILE_LINEAR_RGB)
+ if (ibuf->profile == IB_PROFILE_LINEAR_RGB) {
profile_from = IB_PROFILE_LINEAR_RGB;
- else if (ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE))
+ }
+ else if (ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE)) {
profile_from = IB_PROFILE_SRGB;
- else
+ }
+ else {
+ profile_from = IB_PROFILE_SRGB; /* should never happen */
BLI_assert(0);
+ }
/* do conversion */
IMB_buffer_byte_from_float((uchar *)ibuf->rect, ibuf->rect_float,
@@ -571,12 +575,16 @@ void IMB_partial_rect_from_float(ImBuf *ibuf, float *buffer, int x, int y, int w
imb_addrectImBuf(ibuf);
/* determine profiles */
- if (ibuf->profile == IB_PROFILE_LINEAR_RGB)
+ if (ibuf->profile == IB_PROFILE_LINEAR_RGB) {
profile_from = IB_PROFILE_LINEAR_RGB;
- else if (ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE))
+ }
+ else if (ELEM(ibuf->profile, IB_PROFILE_SRGB, IB_PROFILE_NONE)) {
profile_from = IB_PROFILE_SRGB;
- else
+ }
+ else {
+ profile_from = IB_PROFILE_SRGB; /* should never happen */
BLI_assert(0);
+ }
/* do conversion */
rect_float = ibuf->rect_float + (x + y * ibuf->x) * ibuf->channels;