[Bf-blender-cvs] [e2e31b9baca] master: Cleanup: compiler warnings

Campbell Barton noreply at git.blender.org
Fri Oct 2 05:48:26 CEST 2020


Commit: e2e31b9baca8fa98273f029c6ca47eab662db747
Author: Campbell Barton
Date:   Fri Oct 2 11:39:27 2020 +1000
Branches: master
https://developer.blender.org/rBe2e31b9baca8fa98273f029c6ca47eab662db747

Cleanup: compiler warnings

===================================================================

M	source/blender/blenkernel/intern/volume_render.cc
M	source/blender/gpu/intern/gpu_framebuffer_private.hh
M	source/blender/makesdna/DNA_modifier_defaults.h
M	source/blender/makesrna/intern/rna_collection.c

===================================================================

diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc
index a4c59cb5046..fb5d16e3288 100644
--- a/source/blender/blenkernel/intern/volume_render.cc
+++ b/source/blender/blenkernel/intern/volume_render.cc
@@ -489,6 +489,7 @@ void BKE_volume_grid_wireframe(const Volume *volume,
 #endif
 }
 
+#ifdef WITH_OPENVDB
 static void grow_triangles(blender::MutableSpan<blender::float3> verts,
                            blender::Span<std::array<int, 3>> tris,
                            const float factor)
@@ -506,6 +507,7 @@ static void grow_triangles(blender::MutableSpan<blender::float3> verts,
     verts[i] += offsets[i];
   }
 }
+#endif /* WITH_OPENVDB */
 
 void BKE_volume_grid_selection_surface(const Volume *volume,
                                        VolumeGrid *volume_grid,
diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh
index da44773039b..87f0f3823e6 100644
--- a/source/blender/gpu/intern/gpu_framebuffer_private.hh
+++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh
@@ -54,9 +54,10 @@ typedef enum GPUAttachmentType : int {
    * the maximum number of COLOR attachments specified by glDrawBuffers. */
   GPU_FB_MAX_ATTACHMENT,
 
-  GPU_FB_MAX_COLOR_ATTACHMENT = (GPU_FB_MAX_ATTACHMENT - GPU_FB_COLOR_ATTACHMENT0),
 } GPUAttachmentType;
 
+#define GPU_FB_MAX_COLOR_ATTACHMENT (GPU_FB_MAX_ATTACHMENT - GPU_FB_COLOR_ATTACHMENT0)
+
 inline constexpr GPUAttachmentType operator-(GPUAttachmentType a, int b)
 {
   return static_cast<GPUAttachmentType>(static_cast<int>(a) - b);
diff --git a/source/blender/makesdna/DNA_modifier_defaults.h b/source/blender/makesdna/DNA_modifier_defaults.h
index 5f46d4f5cef..41db7c914aa 100644
--- a/source/blender/makesdna/DNA_modifier_defaults.h
+++ b/source/blender/makesdna/DNA_modifier_defaults.h
@@ -206,7 +206,6 @@
     .current_xnew = NULL, \
     .current_x = NULL, \
     .current_v = NULL, \
-    .current_v = NULL, \
     .tri = NULL, \
     .mvert_num = 0, \
     .tri_num = 0, \
diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c
index 69f8bd85975..df1d7abd6b1 100644
--- a/source/blender/makesrna/intern/rna_collection.c
+++ b/source/blender/makesrna/intern/rna_collection.c
@@ -25,6 +25,7 @@
 #include "BLI_utildefines.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"



More information about the Bf-blender-cvs mailing list