+ scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
has been added to the -mm tree.  Its filename is
     scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
Subject: scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized

In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function `main':
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
   memset(relocs, 0, relocs_size);
   ^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
  int relocs_size;
      ^

gcc 4.9.1

Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
Reviewed-by: Jamie Iles <jamie.iles@xxxxxxxxxx>

Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/sortextable.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN scripts/sortextable.h~scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized scripts/sortextable.h
--- a/scripts/sortextable.h~scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized
+++ a/scripts/sortextable.h
@@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *cons
 	Elf_Sym *sort_needed_sym;
 	Elf_Shdr *sort_needed_sec;
 	Elf_Rel *relocs = NULL;
-	int relocs_size;
+	int relocs_size = 0;
 	uint32_t *sort_done_location;
 	const char *secstrtab;
 	const char *strtab;
_

Patches currently in -mm which might be from tim.gardner@xxxxxxxxxxxxx are

scripts-sortextable-suppress-warning-relocs_size-may-be-used-uninitialized.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux