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>2014-07-28 14:41:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-28 14:45:36 +0400
commit93d0a2c2244637cbd02381241e4ea075106b0044 (patch)
treece3d58044fded0650913a87c063f071c8c7d8c14 /source/blender
parentbaa58c7db477cf58d8091d0ec4977932d3edfc02 (diff)
Warnings
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c10
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c14
-rw-r--r--source/blender/makesrna/intern/rna_internal.h2
3 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 7bdce4e19d5..ccedb6f6b71 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -51,10 +51,12 @@
#define STACK_FIXED_DEPTH 100
/* Setting zero so we can catch bugs in OpenMP/PBVH. */
-#ifdef DEBUG
-# define PBVH_OMP_LIMIT 0
-#else
-# define PBVH_OMP_LIMIT 8
+#ifdef _OPENMP
+# ifdef DEBUG
+# define PBVH_OMP_LIMIT 0
+# else
+# define PBVH_OMP_LIMIT 8
+# endif
#endif
typedef struct PBVHStack {
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 7b7463ca8b3..17ab55e58f4 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -48,10 +48,12 @@
/* Setting zero so we can catch bugs in OpenMP/KDOPBVH.
* TODO(sergey): Deduplicate the limits with PBVH from BKE.
*/
-#ifdef DEBUG
-# define KDOPBVH_OMP_LIMIT 0
-#else
-# define KDOPBVH_OMP_LIMIT 1024
+#ifdef _OPENMP
+# ifdef DEBUG
+# define KDOPBVH_OMP_LIMIT 0
+# else
+# define KDOPBVH_OMP_LIMIT 1024
+# endif
#endif
typedef unsigned char axis_t;
@@ -759,7 +761,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
/* Loop all branches on this level */
-//#pragma omp parallel for private(j) schedule(static) if (num_leafs > KDOPBVH_OMP_LIMIT)
+#pragma omp parallel for private(j) schedule(static) if (num_leafs > KDOPBVH_OMP_LIMIT)
for (j = i; j < end_j; j++) {
int k;
const int parent_level_index = j - i;
@@ -1112,7 +1114,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
data[j]->stop_axis = min_axis(tree1->stop_axis, tree2->stop_axis);
}
-//#pragma omp parallel for private(j) schedule(static) if (tree1->totleaf > KDOPBVH_OMP_LIMIT)
+#pragma omp parallel for private(j) schedule(static) if (tree1->totleaf > KDOPBVH_OMP_LIMIT)
for (j = 0; j < MIN2(tree1->tree_type, tree1->nodes[tree1->totleaf]->totnode); j++) {
traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]);
}
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index bec6afff131..8ec69997b48 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -414,7 +414,7 @@ void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values);
#endif
/* C11 for compile time range checks */
-#if __STDC_VERSION__ >= 201112L
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define USE_RNA_RANGE_CHECK
# define TYPEOF_MAX(x) \
_Generic(x, \