https://git.reactos.org/?p=reactos.git;a=commitdiff;h=97d3b3ce3349fa87d01ee…
commit 97d3b3ce3349fa87d01ee29d0d08ff2ca8618a7d
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Thu Jun 21 05:05:50 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 8 21:24:07 2018 +0200
[REACTOS] RtlAssert(): use "%lu" as LineNumber format.
---
boot/freeldr/freeldr/lib/debug.c | 4 ++--
sdk/lib/rtl/assert.c | 2 +-
sdk/tools/mkhive/rtl.c | 42 ++++++++++++++++++++--------------------
3 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/boot/freeldr/freeldr/lib/debug.c b/boot/freeldr/freeldr/lib/debug.c
index d2143ad599..1f01f869b2 100644
--- a/boot/freeldr/freeldr/lib/debug.c
+++ b/boot/freeldr/freeldr/lib/debug.c
@@ -488,7 +488,7 @@ RtlAssert(IN PVOID FailedAssertion,
{
if (Message)
{
- DbgPrint("Assertion \'%s\' failed at %s line %u: %s\n",
+ DbgPrint("Assertion \'%s\' failed at %s line %lu: %s\n",
(PCHAR)FailedAssertion,
(PCHAR)FileName,
LineNumber,
@@ -496,7 +496,7 @@ RtlAssert(IN PVOID FailedAssertion,
}
else
{
- DbgPrint("Assertion \'%s\' failed at %s line %u\n",
+ DbgPrint("Assertion \'%s\' failed at %s line %lu\n",
(PCHAR)FailedAssertion,
(PCHAR)FileName,
LineNumber);
diff --git a/sdk/lib/rtl/assert.c b/sdk/lib/rtl/assert.c
index c25516e4a1..0c6fcaeeef 100644
--- a/sdk/lib/rtl/assert.c
+++ b/sdk/lib/rtl/assert.c
@@ -36,7 +36,7 @@ RtlAssert(IN PVOID FailedAssertion,
{
/* Print the assertion */
DbgPrint("\n*** Assertion failed: %s%s\n"
- "*** Source File: %s, line %ld\n\n",
+ "*** Source File: %s, line %lu\n\n",
Message != NULL ? Message : "",
(PSTR)FailedAssertion,
(PSTR)FileName,
diff --git a/sdk/tools/mkhive/rtl.c b/sdk/tools/mkhive/rtl.c
index 3bef91da9a..d8649d22c8 100644
--- a/sdk/tools/mkhive/rtl.c
+++ b/sdk/tools/mkhive/rtl.c
@@ -131,28 +131,28 @@ DbgPrint(
VOID
NTAPI
-RtlAssert(PVOID FailedAssertion,
- PVOID FileName,
- ULONG LineNumber,
- PCHAR Message)
+RtlAssert(IN PVOID FailedAssertion,
+ IN PVOID FileName,
+ IN ULONG LineNumber,
+ IN PCHAR Message OPTIONAL)
{
- if (NULL != Message)
- {
- DbgPrint("Assertion \'%s\' failed at %s line %d: %s\n",
- (PCHAR)FailedAssertion,
- (PCHAR)FileName,
- LineNumber,
- Message);
- }
- else
- {
- DbgPrint("Assertion \'%s\' failed at %s line %d\n",
- (PCHAR)FailedAssertion,
- (PCHAR)FileName,
- LineNumber);
- }
-
- //DbgBreakPoint();
+ if (Message != NULL)
+ {
+ DbgPrint("Assertion \'%s\' failed at %s line %u: %s\n",
+ (PCHAR)FailedAssertion,
+ (PCHAR)FileName,
+ LineNumber,
+ Message);
+ }
+ else
+ {
+ DbgPrint("Assertion \'%s\' failed at %s line %u\n",
+ (PCHAR)FailedAssertion,
+ (PCHAR)FileName,
+ LineNumber);
+ }
+
+ //DbgBreakPoint();
}
// DECLSPEC_NORETURN