I have had the same problem with an older build of Sparkle and have just now found the solution. You need to add this to your compiler flags (e. g. in the xcconfig file or under User-Defined in the build settings):
WARNING_CFLAGS = -Wno-declaration-after-statement
Here is more information about this (though I am still confused as I understand it should still be disabled by default): https://github.com/llvm/llvm-project/issues/53438