[Bf-blender-cvs] [719c86c0a65] master: Fix: compiler warnings due to recent commit

Ethan-Hall noreply at git.blender.org
Mon May 9 13:09:04 CEST 2022


Commit: 719c86c0a65d0e9301fa879b23e3a78229d6f1c8
Author: Ethan-Hall
Date:   Mon May 9 13:06:42 2022 +0200
Branches: master
https://developer.blender.org/rB719c86c0a65d0e9301fa879b23e3a78229d6f1c8

Fix: compiler warnings due to recent commit

This is a fix for warnings caused by the patch b96cdbcf7aac.

Differential Revision: https://developer.blender.org/D14891

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

M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 872dfe68793..02e992029ff 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -6600,12 +6600,15 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
       }
       case PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE: {
         new_node = nodeAddStaticNode(C, ntree, SH_NODE_ATTRIBUTE);
-        if (layer = proj_paint_color_attribute_create(op, ob)) {
+        if ((layer = proj_paint_color_attribute_create(op, ob))) {
           BLI_strncpy_utf8(
-              &((NodeShaderAttribute *)new_node->storage)->name, &layer->name, MAX_NAME);
+              ((NodeShaderAttribute *)new_node->storage)->name, layer->name, MAX_NAME);
         }
         break;
       }
+      case PAINT_CANVAS_SOURCE_MATERIAL:
+        BLI_assert_unreachable();
+        return false;
     }
     nodeSetActive(ntree, new_node);
 
@@ -6783,6 +6786,9 @@ static void texture_paint_add_texture_paint_slot_ui(bContext *C, wmOperator *op)
       uiItemR(layout, op->ptr, "domain", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
       uiItemR(layout, op->ptr, "data_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
       break;
+    case PAINT_CANVAS_SOURCE_MATERIAL:
+      BLI_assert_unreachable();
+      break;
   }
 
   uiItemR(layout, op->ptr, "color", 0, NULL, ICON_NONE);



More information about the Bf-blender-cvs mailing list