[Bf-blender-cvs] [5312cf50a1f] blender-v3.1-release: Fix strict warning initializing texture result in compositor

Sergey Sharybin noreply at git.blender.org
Thu Feb 10 10:47:38 CET 2022


Commit: 5312cf50a1f71f9baa63d516f1e5eef728339efb
Author: Sergey Sharybin
Date:   Thu Feb 10 10:46:06 2022 +0100
Branches: blender-v3.1-release
https://developer.blender.org/rB5312cf50a1f71f9baa63d516f1e5eef728339efb

Fix strict warning initializing texture result in compositor

>From a strict language point of view the code required a braces around
`trgba` initialization. But it is easier to rely on the fact that fields
which are not specified are zero-initialized.

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

M	source/blender/compositor/operations/COM_TextureOperation.cc

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

diff --git a/source/blender/compositor/operations/COM_TextureOperation.cc b/source/blender/compositor/operations/COM_TextureOperation.cc
index 069d00b5e66..f0e661818f8 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cc
+++ b/source/blender/compositor/operations/COM_TextureOperation.cc
@@ -102,7 +102,7 @@ void TextureBaseOperation::execute_pixel_sampled(float output[4],
                                                  float y,
                                                  PixelSampler sampler)
 {
-  TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, nullptr};
+  TexResult texres = {0.0f};
   float texture_size[4];
   float texture_offset[4];
   float vec[3];



More information about the Bf-blender-cvs mailing list