This is the mail archive of the
mailing list for the elfutils project.
[Bug general/21011] New: "may be used uninitialized" error with -Werror=maybe-uninitialized
- From: "luizluca at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: elfutils-devel at sourceware dot org
- Date: Fri, 30 Dec 2016 21:38:32 +0000
- Subject: [Bug general/21011] New: "may be used uninitialized" error with -Werror=maybe-uninitialized
- Auto-submitted: auto-generated
Bug ID: 21011
Summary: "may be used uninitialized" error with
Assignee: unassigned at sourceware dot org
Reporter: luizluca at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
I get this error when compiling with -Werror=maybe-uninitialized
elf_getarsym.c: In function 'elf_getarsym':
elf_getarsym.c:200:14: error: 'n' may be used uninitialized in this function
size_t ar_sym_len = (n + 1) * sizeof (Elf_Arsym);
I know that read_number_entries define its values unconditionally but it won't
hurt to simply use:
uint64_t n = 0;
Is it ok?
You are receiving this mail because:
You are on the CC list for the bug.