Page MenuHome

Fix: compiler warnings due to recent patch
ClosedPublic

Authored by Ethan Hall (Ethan1080) on May 9 2022, 11:17 AM.

Details

Diff Detail

Repository
rB Blender
Branch
fix_D14724_warnings (branched from master)
Build Status
Buildable 22022
Build 22022: arc lint + arc unit

Event Timeline

Ethan Hall (Ethan1080) requested review of this revision.May 9 2022, 11:17 AM
Ethan Hall (Ethan1080) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.May 9 2022, 11:26 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/paint_image_proj.c
6603
6610

The BLI_assert_unreachable is a no-op in release builds, which means release builds will still generate warning: variable 'new_node' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]

This revision now requires changes to proceed.May 9 2022, 11:26 AM
Jeroen Bakker (jbakker) added inline comments.
source/blender/editors/sculpt_paint/paint_image_proj.c
6609

Would not use default.
when adding new option, the compiler will poke the developer to think about the new option he added, default will hide this.

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

oops

6610

I should return false after the assert.

Ethan Hall (Ethan1080) marked 3 inline comments as done.May 9 2022, 11:46 AM
This revision is now accepted and ready to land.May 9 2022, 11:56 AM