Skip to contentSkip to conversation

svm/emulate: remove duplicated const specifier

PATCH In review Wei Liu 2 participants 2 messages Sep 30, 2016

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 svm/emulate: remove duplicated const specifier

Clang complains:

emulate.c:65:3: error: duplicate 'const' declaration specifier
[-Werror,-Wduplicate-decl-specifier]
} const opc_tab[INSTR_MAX_COUNT] = {
^

Remove that const to fix the issue.

---
 xen/arch/x86/hvm/svm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/svm/emulate.c +1 -1
index 7f6401f..36585b0 100644
@@ -62,7 +62,7 @@ static const struct {
         unsigned int mod:2;
 #define MODRM(mod, reg, rm) { rm, reg, mod }
     } modrm;
-} const opc_tab[INSTR_MAX_COUNT] = {
+} opc_tab[INSTR_MAX_COUNT] = {
     [INSTR_PAUSE]   = { X86EMUL_OPC_F3(0, 0x90) },
     [INSTR_INT3]    = { X86EMUL_OPC(   0, 0xcc) },
     [INSTR_HLT]     = { X86EMUL_OPC(   0, 0xf4) },
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Wei Liu

Clang complains:

emulate.c:65:3: error: duplicate 'const' declaration specifier
[-Werror,-Wduplicate-decl-specifier]
} const opc_tab[INSTR_MAX_COUNT] = {
^

Remove that const to fix the issue.

Quoted 9 lines
---
 xen/arch/x86/hvm/svm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/svm/emulate.c +0 -0
index 7f6401f..36585b0 100644

xen/arch/x86/hvm/svm/emulate.c static const struct { · line 68

Quoted 8 lines
xen/arch/x86/hvm/svm/emulate.c +1 -1
@@ -62,7 +62,7 @@ static const struct {
         unsigned int mod:2;
 #define MODRM(mod, reg, rm) { rm, reg, mod }
     } modrm;
-} const opc_tab[INSTR_MAX_COUNT] = {
+} opc_tab[INSTR_MAX_COUNT] = {
     [INSTR_PAUSE]   = { X86EMUL_OPC_F3(0, 0x90) },
     [INSTR_INT3]    = { X86EMUL_OPC(   0, 0xcc) },
     [INSTR_HLT]     = { X86EMUL_OPC(   0, 0xf4) },

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel