public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: sortextable: change type and initialise variable
@ 2014-07-15  9:12 Klemen Jan Enova
  2014-08-05 16:04 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Klemen Jan Enova @ 2014-07-15  9:12 UTC (permalink / raw)
  To: linux-kernel

Change the type of 'relocs_size' from 'int' to 'Elf32_Word' and 
initialize it to 0, to fix the "maybe uninitialised variable" compiler 
warning.

Signed-off-by: Klemen Jan Enova <klemen.jan.enova@gmail.com>
---
diff --git a/scripts/sortextable.h b/scripts/sortextable.h
index 8fac3fd..537858d 100644
--- a/scripts/sortextable.h
+++ b/scripts/sortextable.h
@@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, 
table_sort_
         Elf_Sym *sort_needed_sym;
         Elf_Shdr *sort_needed_sec;
         Elf_Rel *relocs = NULL;
-       int relocs_size;
+       Elf32_Word relocs_size = 0;
         uint32_t *sort_done_location;
         const char *secstrtab;
         const char *strtab;

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

* Re: [PATCH] scripts: sortextable: change type and initialise variable
  2014-07-15  9:12 [PATCH] scripts: sortextable: change type and initialise variable Klemen Jan Enova
@ 2014-08-05 16:04 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2014-08-05 16:04 UTC (permalink / raw)
  To: Klemen Jan Enova; +Cc: linux-kernel

On 2014-07-15 11:12, Klemen Jan Enova wrote:
> Change the type of 'relocs_size' from 'int' to 'Elf32_Word' and 
> initialize it to 0, to fix the "maybe uninitialised variable" compiler 
> warning.

Please include the verbatim warning in the commit message.



> Signed-off-by: Klemen Jan Enova <klemen.jan.enova@gmail.com>
> ---
> diff --git a/scripts/sortextable.h b/scripts/sortextable.h
> index 8fac3fd..537858d 100644
> --- a/scripts/sortextable.h
> +++ b/scripts/sortextable.h
> @@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, 
> table_sort_

Your mailer corrupted the patch by inserting a line break here.


>          Elf_Sym *sort_needed_sym;
>          Elf_Shdr *sort_needed_sec;
>          Elf_Rel *relocs = NULL;
> -       int relocs_size;
> +       Elf32_Word relocs_size = 0;

... and changed tabs to spaces. Please send the patch to yourself first
and see if it applies with 'git am.'

Michal

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

end of thread, other threads:[~2014-08-05 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15  9:12 [PATCH] scripts: sortextable: change type and initialise variable Klemen Jan Enova
2014-08-05 16:04 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox