Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756712AbdLXB4j (ORCPT ); Sat, 23 Dec 2017 20:56:39 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:35182 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbdLXB4i (ORCPT ); Sat, 23 Dec 2017 20:56:38 -0500 X-Google-Smtp-Source: ACJfBotIOStoqipsC3q9C47p3KcxU/zFGfZWCntAVLKeIvZQfyO/hSPc+flyk0BWsp4cvnUorXwKLg== From: Nick Desaulniers To: Josh Poimboeuf Cc: Nick Desaulniers , Ingo Molnar , Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH] objtool: fix enum-conversion warning Date: Sat, 23 Dec 2017 20:56:16 -0500 Message-Id: <1514080577-2746-1-git-send-email-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 30 When compiling with Clang, the following warning is observed: CC tools/objtool/arch/x86/decode.o arch/x86/decode.c:141:20: error: implicit conversion from enumeration type 'enum op_src_type' to different enumeration type 'enum op_dest_type' [-Werror,-Wenum-conversion] op->dest.type = OP_SRC_REG; ~ ^~~~~~~~~~ Signed-off-by: Nick Desaulniers --- tools/objtool/arch/x86/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c index 8acfc47..540a209 100644 --- a/tools/objtool/arch/x86/decode.c +++ b/tools/objtool/arch/x86/decode.c @@ -138,7 +138,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec, *type = INSN_STACK; op->src.type = OP_SRC_ADD; op->src.reg = op_to_cfi_reg[modrm_reg][rex_r]; - op->dest.type = OP_SRC_REG; + op->dest.type = OP_DEST_REG; op->dest.reg = CFI_SP; } break; -- 2.7.4