Makuna / NeoPixelBus

An Arduino NeoPixel support library supporting a large variety of individually addressable LEDs. Please refer to the Wiki for more details. Please use the GitHub Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
1.18k stars 264 forks source link

Fix incorrect syntax for unlikely annotation. #810

Closed jterrace closed 5 months ago

jterrace commented 5 months ago

I'm not sure what this unlikely syntax was, but it didn't compile, at least for me. I switched it to using the [[unlikely]] annotation the way it's supposed to be added for an unlikely conditional branch.

I also reformatted this macro, since the line continuations were all off.

jterrace commented 5 months ago

huh okay, let me see if I can figure out what is going on then, because the unlikely macro is not defined when compiling WLED

jterrace commented 5 months ago

I'm using https://github.com/Aircoookie/arduino-esp32 which seems to define likely/unlikely. I'm not sure why it's not working but for now, I just added:

-D CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=1

to get past the error.