forked from bartvdbraak/blender
quiet compiler warnings for -Wundef
This commit is contained in:
parent
b1ddf90239
commit
6e39d908a9
@ -86,7 +86,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define BLENDER_USER_FORMAT "%s\\Blender Foundation\\Blender\\%s"
|
#define BLENDER_USER_FORMAT "%s\\Blender Foundation\\Blender\\%s"
|
||||||
#define BLENDER_SYSTEM_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_USER_FORMAT "%s/Blender/%s"
|
||||||
#define BLENDER_SYSTEM_FORMAT "%s/Blender/%s"
|
#define BLENDER_SYSTEM_FORMAT "%s/Blender/%s"
|
||||||
#else
|
#else
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
|
||||||
/* WARNING: MSVC compiling hack for double_round() */
|
/* 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 */
|
/* from python 3.1 pymath.c */
|
||||||
double copysign(double x, double y)
|
double copysign(double x, double y)
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
#define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff))
|
#define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff))
|
||||||
|
|
||||||
/* more endianness... should move to a separate file... */
|
/* 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 GET_ID GET_BIG_LONG
|
||||||
#define LITTLE_LONG SWAP_LONG
|
#define LITTLE_LONG SWAP_LONG
|
||||||
#else
|
#else
|
||||||
|
@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined HAVE_LIMITS_H || _LIBC
|
#if defined HAVE_LIMITS_H || defined _LIBC
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -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 */
|
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);
|
PyObject *item= PySequence_GetItem(arg, 0);
|
||||||
const unsigned short col_size= PySequence_Size(item);
|
const unsigned short col_size= PySequence_Size(item);
|
||||||
Py_XDECREF(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 */
|
/* sane row & col size, new matrix and assign as slice */
|
||||||
PyObject *matrix= newMatrixObject(NULL, row_size, col_size, Py_NEW, type);
|
PyObject *matrix= newMatrixObject(NULL, row_size, col_size, Py_NEW, type);
|
||||||
if(Matrix_ass_slice((MatrixObject *)matrix, 0, INT_MAX, arg) == 0) {
|
if(Matrix_ass_slice((MatrixObject *)matrix, 0, INT_MAX, arg) == 0) {
|
||||||
|
@ -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,"CINEON")) scene->r.imtype = R_CINEON;
|
||||||
else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX;
|
else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX;
|
||||||
#endif
|
#endif
|
||||||
#if WITH_OPENJPEG
|
#ifdef WITH_OPENJPEG
|
||||||
else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2;
|
else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2;
|
||||||
#endif
|
#endif
|
||||||
else printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n");
|
else printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user