When compiling blender (2.8) a lot of warnings are generated that ATTR_FALLTHROUGH has already been assigned.
This patch (hopefully done right) solves this
Thanks for looking into it.
Differential D3960
ATTR_FALLTHROUGH duplicate definition warnings Authored by Roel Koster (kostex) on Nov 19 2018, 9:37 AM.
Details
When compiling blender (2.8) a lot of warnings are generated that ATTR_FALLTHROUGH has already been assigned. Thanks for looking into it.
Diff Detail
Event TimelineComment Actions I noticed this too, and was about to submit an issue. I think you can use #ifndef instead of #if !defined(. I would also probably put it on both definitions since GCC7+ would still produce warnings. The cleanest way would be to simply wrap the whole if else with an ifndef. Comment Actions It shouldn't be defined multiple times in the first place. If we check if it has been defined before, we don't know if the macro has been defined correctly. I've never seen this warning though, it would help to see the compiler warning log to understand why it happens. Comment Actions They are really not all that hard to miss, all platforms have the warning: on mac, starts on line 735 Comment Actions That patch only protects one of the places, not both - I don't think the includes are ordered in such a way where that stops all the warnings. I still get lots of warnings for when the Cycles header in included first. |