summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-04-28 12:31:14 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-04-29 10:30:43 +0300
commit40b275b4a7ff68a53f09da28958c132050cc674a (patch)
treef362289a60df8d7d1950ad478d6f71f00fbd1fee /tools
parent27086a30157d06c4d690d0f77e20eec17883aa00 (diff)
downloadrpm-40b275b4a7ff68a53f09da28958c132050cc674a.tar.gz
rpm-40b275b4a7ff68a53f09da28958c132050cc674a.tar.bz2
rpm-40b275b4a7ff68a53f09da28958c132050cc674a.zip
Fix a few uninitialized variable cases found by clang-analyzer
Diffstat (limited to 'tools')
-rw-r--r--tools/elfdeps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/elfdeps.c b/tools/elfdeps.c
index f9595efa1..b4451093a 100644
--- a/tools/elfdeps.c
+++ b/tools/elfdeps.c
@@ -36,7 +36,7 @@ static int skipPrivate(const char *s)
static void processVerDef(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
{
- Elf_Data *data;
+ Elf_Data *data = NULL;
unsigned int offset, auxoffset;
char *soname = NULL;
@@ -80,7 +80,7 @@ static void processVerDef(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
static void processVerNeed(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
{
- Elf_Data *data;
+ Elf_Data *data = NULL;
char *soname = NULL;
while ((data = elf_getdata(scn, data)) != NULL) {
unsigned int offset = 0, auxoffset;
@@ -124,7 +124,7 @@ static void processVerNeed(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
static void processDynamic(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
{
- Elf_Data *data;
+ Elf_Data *data = NULL;
while ((data = elf_getdata(scn, data)) != NULL) {
for (int i = 0; i < (shdr->sh_size / shdr->sh_entsize); i++) {
ARGV_t *deptype = NULL;
@@ -172,7 +172,7 @@ static void processDynamic(Elf_Scn *scn, GElf_Shdr *shdr, elfInfo *ei)
static void processSections(elfInfo *ei)
{
- Elf_Scn * scn;
+ Elf_Scn * scn = NULL;
while ((scn = elf_nextscn(ei->elf, scn)) != NULL) {
GElf_Shdr shdr_mem, *shdr;
shdr = gelf_getshdr(scn, &shdr_mem);