code cleanup: misc warnings/style

This commit is contained in:
Campbell Barton
2013-03-21 02:58:21 +00:00
parent 2d236a57b7
commit 3966722057
10 changed files with 42 additions and 35 deletions

View File

@@ -536,7 +536,7 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
if(UNIX AND NOT APPLE)
macro(find_package_wrapper)
STRING(TOUPPER ${ARGV0} _NAME_UPPER)
string(TOUPPER ${ARGV0} _NAME_UPPER)
if(${WITH_STATIC_LIBS})
set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
@@ -691,6 +691,7 @@ if(UNIX AND NOT APPLE)
list(APPEND __boost_packages locale)
endif()
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
unset(__boost_packages)
if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)
find_package(IcuLinux)
endif()
@@ -708,7 +709,7 @@ if(UNIX AND NOT APPLE)
set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere
set(OPENIMAGEIO_DEFINITIONS)
set(OPENIMAGEIO_DEFINITIONS "")
if(WITH_IMAGE_TIFF)
list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}")
@@ -899,7 +900,7 @@ elseif(WIN32)
if(CMAKE_COMPILER_IS_GNUCC)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
INCLUDE (CheckCSourceCompiles)
include(CheckCSourceCompiles)
# Setup 64bit and 64bit windows systems
CHECK_C_SOURCE_COMPILES("
#ifndef __MINGW64__
@@ -1135,7 +1136,7 @@ elseif(WIN32)
endif()
set_lib_path(PYTHON "python")
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
# set(PYTHON_LIBRARY ${PYTHON}/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) #CACHE FILEPATH
@@ -1377,7 +1378,7 @@ elseif(WIN32)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES OpenImageIO)
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS)
set(OPENIMAGEIO_DEFINITIONS "")
endif()
if(WITH_LLVM)

View File

@@ -33,6 +33,8 @@ set(INC_SYS
set(SRC
wcwidth.c
wcwidth.h
)
blender_add_lib(extern_wcwidth "${SRC}" "${INC}" "${INC_SYS}")

View File

@@ -21,11 +21,15 @@
#
# ***** END GPL LICENSE BLOCK *****
SET(INC
set(INC
.
../../extern/bullet2/src
)
set(INC_SYS
)
set(SRC
rb_bullet_api.cpp

View File

@@ -2026,14 +2026,14 @@ static bNodeSocket *make_socket_template(bNodeTree *ntree, int in_out,
* but reconstructing own_index in writefile.c would require parsing the identifier string.
*/
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
sock->own_index = own_index;
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406))
#if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) || defined(__clang__)
# pragma GCC diagnostic pop
#endif

View File

@@ -139,7 +139,7 @@ static int knifeproject_exec(bContext *C, wmOperator *op)
/* select only tagged faces */
BM_mesh_elem_hflag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, false);
/* note essential, but switch out of vertex mode since the
/* not essential, but switch out of vertex mode since the
* selected regions wont be nicely isolated after flushing.
* note: call after de-select to avoid selection flushing */
EDBM_selectmode_disable(scene, em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);

View File

@@ -3029,7 +3029,7 @@ static int edbm_select_ungrouped_exec(bContext *C, wmOperator *op)
BMVert *eve;
BMIter iter;
if (!em->selectmode == SCE_SELECT_VERTEX) {
if ((em->selectmode & SCE_SELECT_VERTEX) == 0) {
BKE_report(op->reports, RPT_ERROR, "Does not work out of vertex selection mode");
return OPERATOR_CANCELLED;
}

View File

@@ -472,7 +472,7 @@ elseif(WIN32)
if(WITH_PYTHON)
set_lib_path(PYLIB "python")
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
install(
FILES ${PYLIB}/lib/python${_PYTHON_VERSION_NO_DOTS}.dll