public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug general/21011] New: "may be used uninitialized" error with -Werror=maybe-uninitialized
@ 2016-12-30 21:38 luizluca at gmail dot com
  2016-12-30 23:14 ` [Bug general/21011] " luizluca at gmail dot com
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: luizluca at gmail dot com @ 2016-12-30 21:38 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=21011

            Bug ID: 21011
           Summary: "may be used uninitialized" error with
                    -Werror=maybe-uninitialized
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: luizluca at gmail dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Hello,

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
[-Werror=maybe-uninitialized]
       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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-04-25  3:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-30 21:38 [Bug general/21011] New: "may be used uninitialized" error with -Werror=maybe-uninitialized luizluca at gmail dot com
2016-12-30 23:14 ` [Bug general/21011] " luizluca at gmail dot com
2016-12-30 23:20 ` pmachata at gmail dot com
2016-12-31 15:54 ` mjw at redhat dot com
2017-03-28 11:48 ` mark at klomp dot org
2017-04-04  5:37 ` luizluca at gmail dot com
2017-04-04  5:37 ` luizluca at gmail dot com
2017-04-04  5:38 ` luizluca at gmail dot com
2017-04-11 11:34 ` mark at klomp dot org
2017-04-17 19:51 ` luizluca at gmail dot com
2017-04-19 14:54 ` mark at klomp dot org
2017-04-19 15:14 ` mark at klomp dot org
2017-04-19 19:50 ` luizluca at gmail dot com
2017-04-19 19:58 ` mark at klomp dot org
2017-04-19 20:07 ` luizluca at gmail dot com
2017-04-25  3:38 ` mark at klomp dot org
2017-04-25 12:15 ` mark at klomp dot org
2017-04-25 12:49 ` luizluca at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).