https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e0400e781021d741754c9…
commit e0400e781021d741754c9affe9a31a8670143790
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Wed Sep 9 03:46:56 2020 +0200
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Fri Mar 5 00:43:15 2021 +0300
[NTOS:KE] KiIdleLoop(): Propagate DECLSPEC_NORETURN to callers
---
ntoskrnl/include/internal/amd64/ke.h | 2 +-
ntoskrnl/include/internal/i386/ke.h | 5 ++++-
ntoskrnl/include/internal/ke.h | 1 +
ntoskrnl/ke/amd64/kiinit.c | 1 +
ntoskrnl/ke/amd64/krnlinit.c | 1 +
ntoskrnl/ke/arm/kiinit.c | 1 +
ntoskrnl/ke/i386/kiinit.c | 2 ++
7 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/include/internal/amd64/ke.h b/ntoskrnl/include/internal/amd64/ke.h
index fa0408b921e..d4e1354290d 100644
--- a/ntoskrnl/include/internal/amd64/ke.h
+++ b/ntoskrnl/include/internal/amd64/ke.h
@@ -310,7 +310,7 @@ struct _KPCR;
//VOID KiInitializeTss(IN PKTSS Tss, IN UINT64 Stack);
-VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack);
+DECLSPEC_NORETURN VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack);
VOID KiDivideErrorFault(VOID);
VOID KiDebugTrapOrFault(VOID);
VOID KiNmiInterrupt(VOID);
diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h
index 5a41246212f..021a379472f 100644
--- a/ntoskrnl/include/internal/i386/ke.h
+++ b/ntoskrnl/include/internal/i386/ke.h
@@ -792,10 +792,11 @@ KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame)
// Switches from boot loader to initial kernel stack
//
FORCEINLINE
+DECLSPEC_NORETURN
VOID
KiSwitchToBootStack(IN ULONG_PTR InitialStack)
{
- VOID NTAPI KiSystemStartupBootStack(VOID);
+ DECLSPEC_NORETURN VOID NTAPI KiSystemStartupBootStack(VOID);
/* We have to switch to a new stack before continuing kernel initialization */
#ifdef __GNUC__
@@ -823,6 +824,8 @@ KiSwitchToBootStack(IN ULONG_PTR InitialStack)
#else
#error Unknown Compiler
#endif
+
+ UNREACHABLE;
}
//
diff --git a/ntoskrnl/include/internal/ke.h b/ntoskrnl/include/internal/ke.h
index f4a8289155e..31621647570 100644
--- a/ntoskrnl/include/internal/ke.h
+++ b/ntoskrnl/include/internal/ke.h
@@ -740,6 +740,7 @@ VOID
NTAPI
KiInitializeBugCheck(VOID);
+DECLSPEC_NORETURN
VOID
NTAPI
KiSystemStartup(
diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c
index c8610b83e6b..eb66b349fa6 100644
--- a/ntoskrnl/ke/amd64/kiinit.c
+++ b/ntoskrnl/ke/amd64/kiinit.c
@@ -367,6 +367,7 @@ KiInitModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
}
CODE_SEG("INIT")
+DECLSPEC_NORETURN
VOID
NTAPI
KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
diff --git a/ntoskrnl/ke/amd64/krnlinit.c b/ntoskrnl/ke/amd64/krnlinit.c
index 8b5d7003cdf..a946d92801c 100644
--- a/ntoskrnl/ke/amd64/krnlinit.c
+++ b/ntoskrnl/ke/amd64/krnlinit.c
@@ -52,6 +52,7 @@ KiInitializeHandBuiltThread(
}
CODE_SEG("INIT")
+DECLSPEC_NORETURN
VOID
NTAPI
KiSystemStartupBootStack(VOID)
diff --git a/ntoskrnl/ke/arm/kiinit.c b/ntoskrnl/ke/arm/kiinit.c
index 03f22153de3..e5396370e96 100644
--- a/ntoskrnl/ke/arm/kiinit.c
+++ b/ntoskrnl/ke/arm/kiinit.c
@@ -327,6 +327,7 @@ KiInitializeMachineType(VOID)
}
}
+DECLSPEC_NORETURN
VOID
KiInitializeSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
diff --git a/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c
index 9fb22698bca..0414176c3d8 100644
--- a/ntoskrnl/ke/i386/kiinit.c
+++ b/ntoskrnl/ke/i386/kiinit.c
@@ -657,6 +657,7 @@ KiGetMachineBootPointers(IN PKGDTENTRY *Gdt,
}
CODE_SEG("INIT")
+DECLSPEC_NORETURN
VOID
NTAPI
KiSystemStartupBootStack(VOID)
@@ -709,6 +710,7 @@ KiMarkPageAsReadOnly(
}
CODE_SEG("INIT")
+DECLSPEC_NORETURN
VOID
NTAPI
KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock)