Skip to content

Commit

Permalink
Fix unannotated fall-through warning in SPIRVWriter.cpp
Browse files Browse the repository at this point in the history
By adding the missing `break`.

SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:3718:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
 3718 |     default:
      |     ^
SPIRV-LLVM-Translator/lib/SPIRV/SPIRVWriter.cpp:3718:5: note: insert 'break;' to avoid fall-through
 3718 |     default:
      |     ^
      |     break;

As the default case was just `break`, the behaviour is the same
but this should prevent future mistakes here.
  • Loading branch information
DavidSpickett committed Oct 8, 2024
1 parent e16f698 commit c3f19b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/SPIRV/SPIRVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3713,6 +3713,7 @@ void addAnnotationDecorations(SPIRVEntry *E, DecorationsInfoVec &Decorations) {
E->addDecorate(new SPIRVDecorateCacheControlLoadINTEL(
E, CacheLevel, static_cast<LoadCacheControl>(CacheControl)));
}
break;
}

default:
Expand Down

0 comments on commit c3f19b8

Please sign in to comment.