https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c72066f87f7f9927e0152…
commit c72066f87f7f9927e015235e37fd0dd6023e1089
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Nov 3 13:53:35 2017 +0100
[NTOS:KDBG] Silence clang -Wstring-plus-int warnings.
..\ntoskrnl\kdbg\i386\i386-dis.c(3131,23): warning: adding 'char' to a string
does not append to the string [-Wstring-plus-int]
oappend ("%cs:" + intel_syntax);
~~~~~~~^~~~~~~~~~~~~~
..\ntoskrnl\kdbg\i386\i386-dis.c(3131,23): note: use array indexing to silence this
warning
oappend ("%cs:" + intel_syntax);
^
& [ ]
---
ntoskrnl/kdbg/i386/i386-dis.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ntoskrnl/kdbg/i386/i386-dis.c b/ntoskrnl/kdbg/i386/i386-dis.c
index 93b4194dc8..cf3c75f899 100644
--- a/ntoskrnl/kdbg/i386/i386-dis.c
+++ b/ntoskrnl/kdbg/i386/i386-dis.c
@@ -3128,32 +3128,32 @@ append_seg (void)
if (prefixes & PREFIX_CS)
{
used_prefixes |= PREFIX_CS;
- oappend ("%cs:" + intel_syntax);
+ oappend (&"%cs:"[intel_syntax]);
}
if (prefixes & PREFIX_DS)
{
used_prefixes |= PREFIX_DS;
- oappend ("%ds:" + intel_syntax);
+ oappend (&"%ds:"[intel_syntax]);
}
if (prefixes & PREFIX_SS)
{
used_prefixes |= PREFIX_SS;
- oappend ("%ss:" + intel_syntax);
+ oappend (&"%ss:"[intel_syntax]);
}
if (prefixes & PREFIX_ES)
{
used_prefixes |= PREFIX_ES;
- oappend ("%es:" + intel_syntax);
+ oappend (&"%es:"[intel_syntax]);
}
if (prefixes & PREFIX_FS)
{
used_prefixes |= PREFIX_FS;
- oappend ("%fs:" + intel_syntax);
+ oappend (&"%fs:"[intel_syntax]);
}
if (prefixes & PREFIX_GS)
{
used_prefixes |= PREFIX_GS;
- oappend ("%gs:" + intel_syntax);
+ oappend (&"%gs:"[intel_syntax]);
}
}
@@ -4029,7 +4029,7 @@ ptr_reg (int code, int sizeflag)
static void
OP_ESreg (int code, int sizeflag)
{
- oappend ("%es:" + intel_syntax);
+ oappend (&"%es:"[intel_syntax]);
ptr_reg (code, sizeflag);
}