Просмотр исходного кода

Fix unnanotated fallthroughs - C26819

Aditya Mandaleeka 1 год назад
Родитель
Сommit
d35b77073a

+ 1 - 0
src/Servers/IIS/AspNetCoreModuleV2/AspNetCore/dllmain.cpp

@@ -57,6 +57,7 @@ BOOL WINAPI DllMain(HMODULE hModule,
         // this is a bug in IIS. To try to avoid AVs, we will set a global flag
         g_fInShutdown = TRUE;
         StaticCleanup();
+        break;
     default:
         break;
     }

+ 1 - 1
src/Servers/IIS/AspNetCoreModuleV2/DefaultRules.ruleset

@@ -99,7 +99,7 @@
     <Rule Id="C26498" Action="Error" />
     <Rule Id="C26814" Action="None" /> <!-- The const variable 'variable' can be computed at compile time. Consider using constexpr -->
     <Rule Id="C26818" Action="None" /> <!-- Switch statement does not cover all cases. Consider adding a 'default' label -->
-    <Rule Id="C26819" Action="None" /> <!-- Unannotated fallthrough -->
+    <Rule Id="C26819" Action="Error" />
     <Rule Id="C26826" Action="None" /> <!-- Don't use C-style variable arguments -->
     <Rule Id="C26859" Action="None" /> <!-- Empty optional '<var>' is unwrapped, will throw exception. -->
     <Rule Id="C28020" Action="None" /> <!-- The expression 'expr' is not true at this call -->

+ 1 - 0
src/Servers/IIS/AspNetCoreModuleV2/InProcessRequestHandler/dllmain.cpp

@@ -85,6 +85,7 @@ BOOL APIENTRY DllMain(HMODULE hModule,
         IN_PROCESS_HANDLER::StaticTerminate();
         ALLOC_CACHE_HANDLER::StaticTerminate();
         DebugStop();
+        break;
     default:
         break;
     }

+ 1 - 0
src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/dllmain.cpp

@@ -223,6 +223,7 @@ BOOL APIENTRY DllMain(HMODULE hModule,
         FORWARDING_HANDLER::StaticTerminate();
         ALLOC_CACHE_HANDLER::StaticTerminate();
         DebugStop();
+        break;
     default:
         break;
     }