Fedora 32 includes Clang 10.0.0, which is a bit more strict about switch-statement fall-through annotations, and about converting enums to bools. This causes us to hit compilation warnings on all supported Tor versions.
Looking at the code more: it seems that clang actually does catch the same cases here as gcc does, but that clang does not recognize the same magic "/* fall through" comments as gcc.
Current plan is to disable the warning in 0.3.5 through 0.4.2, but replace the fallthrough with an attribute in 043 and later.
Okay, I have a proof-of-concept as https://github.com/torproject/tor/pull/1882 against maint-0.3.5. I don't suggest merging it yet: it needs a changes file. I've just made a PR so that we can see what CI thinks.
Once CI passes, I'll add a changes file, and then remove the final (automated) commit from the branch. At that point, I think the best move is to merge the non-automated parts of the branch to all supported versions, and then apply the automated part individually to each version. That way we will get the right fix everywhere without any conflicts.
If these pass review, my plan is that we should merge the "prelim" branches as normal, and then one by one apply the fix script to each maint branch, then do an "ours" merge to the next branch before applying the script to that branch too. In this way, we don't need to worry about conflicts from code movement.
Trac: Actualpoints: N/Ato 1 Status: accepted to needs_review
The preliminary patches looks good. In the master example PR, the comment /* Fallthrough is to disallow since this means the bucket has reached 0. */ is erased in hs_dos.c. I think that is the only issue I could spot.
I don't have Clang 10 locally to try it though.
If the comment is restored, I think this can be merged.