Skip to content

Commit

Permalink
modpost: remove unneeded initializer in section_rel()
Browse files Browse the repository at this point in the history
This initializer was added to avoid -Wmaybe-uninitialized (gcc) and
-Wsometimes-uninitialized (clang) warnings.

Now that compilers recognize fatal() never returns, it is unneeded.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
  • Loading branch information
Masahiro Yamada committed Dec 10, 2023
1 parent 16a473f commit 5cac96f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ static void section_rel(struct module *mod, struct elf_info *elf,

for (rel = start; rel < stop; rel++) {
Elf_Sym *tsym;
Elf_Addr taddr = 0, r_offset;
Elf_Addr taddr, r_offset;
unsigned int r_type, r_sym;
void *loc;

Expand Down

0 comments on commit 5cac96f

Please sign in to comment.