|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 08/18] Annotate logging format strings
Annotate logging functions with corresponding STR typedefs.
Signed-off-by: Césaire Mounah <cesaire.mounah@xxxxxxxxxx>
---
src/xencrsh/log.c | 10 +++++-----
src/xencrsh/log.h | 4 ++--
src/xenvbd/debug.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/xencrsh/log.c b/src/xencrsh/log.c
index dbff879..2d19aaf 100644
--- a/src/xencrsh/log.c
+++ b/src/xencrsh/log.c
@@ -276,15 +276,15 @@ LogVDebug(
void
__LogMessage(
- _In_ ULONG Level,
- _In_ const char *Function,
- _In_ const char *Format,
+ _In_ ULONG Level,
+ _In_ PCSTR Function,
+ _In_ PCSTR Format,
...
)
{
// Note: __MODULE__ is not defined in SDV builds :(
- static const char* Module = "XENCRSH";
- va_list Args;
+ static const char* Module = "XENCRSH";
+ va_list Args;
va_start(Args, Format);
LogPrintf(LogQemuPut, "%s|%s|%s:", Module, __Mode(), Function);
diff --git a/src/xencrsh/log.h b/src/xencrsh/log.h
index f2cc918..f6d71c3 100644
--- a/src/xencrsh/log.h
+++ b/src/xencrsh/log.h
@@ -41,8 +41,8 @@
extern void
__LogMessage(
_In_ ULONG Level,
- _In_ const char *Func,
- _In_ const char *Format,
+ _In_ PCSTR Function,
+ _In_ PCSTR Format,
...
);
diff --git a/src/xenvbd/debug.h b/src/xenvbd/debug.h
index 617ad99..51948f2 100644
--- a/src/xenvbd/debug.h
+++ b/src/xenvbd/debug.h
@@ -55,8 +55,8 @@
static __inline VOID
__DebugMessage(
_In_ ULONG Level,
- _In_ __nullterminated const CHAR *Prefix,
- _In_ __nullterminated const CHAR *Format,
+ _In_ PCSTR Prefix,
+ _In_ _Printf_format_string_ PCSTR Format,
...
)
{
--
2.55.0.windows.5
--
Césaire Mounah | Vates Windows Guest Tools Engineer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |