lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190328141652.wssqboyekxmp6tkw@yubo-2>
Date:   Thu, 28 Mar 2019 10:16:54 -0400
From:   Bo YU <tsu.yubo@...il.com>
To:     ast@...nel.org, daniel@...earbox.net, kafai@...com,
        songliubraving@...com, yhs@...com, jakub.kicinski@...ronome.com,
        df@...gle.com
Cc:     tsu.yubo@...il.com, quentin.monnet@...ronome.com,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] bpf: bpftool: convert ‘const char *’ type into 'char *' in assignment

When compiling with check flag: make -C tools/bpf/bpftool/
gcc will warning:

jit_disasm.c:119:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
   info.disassembler_options = disassembler_options;

So convert 'const char *' type into 'char *' to fix the warning.

Fixes:3ddeac6705aba(tools: bpftool: use 4 context mode for the NFP disasm)
Signed-off-by: Bo YU <tsu.yubo@...il.com>
---
 tools/bpf/bpftool/jit_disasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c
index 3ef3093560ba..40b46e46454a 100644
--- a/tools/bpf/bpftool/jit_disasm.c
+++ b/tools/bpf/bpftool/jit_disasm.c
@@ -116,7 +116,7 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes,
 	info.arch = bfd_get_arch(bfdf);
 	info.mach = bfd_get_mach(bfdf);
 	if (disassembler_options)
-		info.disassembler_options = disassembler_options;
+		info.disassembler_options = (char *)disassembler_options;
 	info.buffer = image;
 	info.buffer_length = len;
 
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ