aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-07-20 19:44:34 +0300
committerDmitry Vyukov <dvyukov@google.com>2020-07-21 13:04:43 +0200
commite562dd8adff015d44bec3d7fd8e6608a3a031ff3 (patch)
tree8b03c9598a5498efdfb64085f694714bbe67641f /executor
parent328906f3daa5e8e120f92e4d6418d1a5e7e8e19c (diff)
executor: fix build errors in setup_32bit_idt()
GCC10 fails to build the code with errors: executor/common_kvm_amd64.h:143:64: error: ‘gate.kvm_segment::type’ may be used uninitialized in this function [-Werror=maybe-uninitialized] executor/common_kvm_amd64.h:143:56: error: ‘gate.kvm_segment::base’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Replace 'case 6' with 'case 5' since 'i % 6' results in [0..5]. Signed-off-by: Denis Efremov <efremov@linux.com>
Diffstat (limited to 'executor')
-rw-r--r--executor/common_kvm_amd64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/common_kvm_amd64.h b/executor/common_kvm_amd64.h
index 666bf5e3c..a8173b9b3 100644
--- a/executor/common_kvm_amd64.h
+++ b/executor/common_kvm_amd64.h
@@ -208,7 +208,7 @@ static void setup_32bit_idt(struct kvm_sregs* sregs, char* host_mem, uintptr_t g
gate.type = 15;
gate.base = SEL_CS32;
break;
- case 6:
+ case 5:
// 32-bit task gate
gate.type = 11;
gate.base = SEL_TGATE32;