Running clang analyzer

Is JUCE supposed to pass Xcode’s Clang Analyzer check cleanly?

I ran it and i had few dead stores reported (Xcode 12.5):

juce_graphics/image_formats/pnglib/pngwtran.c:418:30: Although the value stored to 'dp' is used in the enclosing expression, the value is never actually read from 'dp'
juce_graphics/image_formats/pnglib/pngwtran.c:438:30: Although the value stored to 'dp' is used in the enclosing expression, the value is never actually read from 'dp'
juce_graphics/image_formats/pnglib/pngwtran.c:480:30: Although the value stored to 'dp' is used in the enclosing expression, the value is never actually read from 'dp'

Or maybe i have to use __clang_analyzer__ to conditionally bypass the JUCE code?

1 Like

I also had this problem.
It would be good if JUCE would avoid these warnings from external libs, here’s a commit to avoid these warnings: Suppress clang analyzer warnings in libvorbis and pnglib code · soundradix/JUCE@bd9e2d9 · GitHub

4 Likes

bump