diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index dd4ae781832..360cd1ea9ab 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -86,7 +86,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check); #ifdef WIN32 #define BLENDER_USER_FORMAT "%s\\Blender Foundation\\Blender\\%s" #define BLENDER_SYSTEM_FORMAT "%s\\Blender Foundation\\Blender\\%s" -#elif __APPLE__ +#elif defined(__APPLE__) #define BLENDER_USER_FORMAT "%s/Blender/%s" #define BLENDER_SYSTEM_FORMAT "%s/Blender/%s" #else diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c index 0e122a23faa..8ad93495f6d 100644 --- a/source/blender/blenlib/intern/math_base.c +++ b/source/blender/blenlib/intern/math_base.c @@ -34,7 +34,7 @@ #include "BLI_math.h" /* WARNING: MSVC compiling hack for double_round() */ -#if (WIN32 || WIN64) && !(FREE_WINDOWS) +#if (defined(WIN32) || defined(WIN64)) && !(defined(FREE_WINDOWS)) /* from python 3.1 pymath.c */ double copysign(double x, double y) diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h index 4804d363628..fba0772dd93 100644 --- a/source/blender/imbuf/intern/IMB_anim.h +++ b/source/blender/imbuf/intern/IMB_anim.h @@ -107,7 +107,7 @@ #define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff)) /* more endianness... should move to a separate file... */ -#if defined(__sgi) || defined (__sparc) || (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) +#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) #define GET_ID GET_BIG_LONG #define LITTLE_LONG SWAP_LONG #else diff --git a/source/blender/imbuf/intern/md5.h b/source/blender/imbuf/intern/md5.h index 5fc1f80216f..79c480d8152 100644 --- a/source/blender/imbuf/intern/md5.h +++ b/source/blender/imbuf/intern/md5.h @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include -#if defined HAVE_LIMITS_H || _LIBC +#if defined HAVE_LIMITS_H || defined _LIBC # include #endif diff --git a/source/blender/python/generic/mathutils_Matrix.c b/source/blender/python/generic/mathutils_Matrix.c index 2b9de49bf3f..80f6ddf2d30 100644 --- a/source/blender/python/generic/mathutils_Matrix.c +++ b/source/blender/python/generic/mathutils_Matrix.c @@ -132,12 +132,12 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds) const unsigned short row_size= PySequence_Size(arg); /* -1 is an error, size checks will accunt for this */ - if(IN_RANGE_INCL(row_size, 2, 4)) { + if(row_size >= 2 && row_size <= 4) { PyObject *item= PySequence_GetItem(arg, 0); const unsigned short col_size= PySequence_Size(item); Py_XDECREF(item); - if(IN_RANGE_INCL(col_size, 2, 4)) { + if(col_size >= 2 && col_size <= 4) { /* sane row & col size, new matrix and assign as slice */ PyObject *matrix= newMatrixObject(NULL, row_size, col_size, Py_NEW, type); if(Matrix_ass_slice((MatrixObject *)matrix, 0, INT_MAX, arg) == 0) { diff --git a/source/creator/creator.c b/source/creator/creator.c index 29ddd2ab1b0..0c29c807554 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -629,7 +629,7 @@ static int set_image_type(int argc, const char **argv, void *data) else if (!strcmp(imtype,"CINEON")) scene->r.imtype = R_CINEON; else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX; #endif -#if WITH_OPENJPEG +#ifdef WITH_OPENJPEG else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2; #endif else printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n");