From e2e31b9baca8fa98273f029c6ca47eab662db747 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 2 Oct 2020 11:39:27 +1000 Subject: Cleanup: compiler warnings --- source/blender/blenkernel/intern/volume_render.cc | 2 ++ source/blender/gpu/intern/gpu_framebuffer_private.hh | 3 ++- source/blender/makesdna/DNA_modifier_defaults.h | 1 - source/blender/makesrna/intern/rna_collection.c | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'source') 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 verts, blender::Span> tris, const float factor) @@ -506,6 +507,7 @@ static void grow_triangles(blender::MutableSpan 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(static_cast(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" -- cgit v1.2.3