[PATCH v2 3/4] modpost: remove unneeded initializer in section_rel()

From: Masahiro Yamada
Date: Sun Dec 03 2023 - 04:50:05 EST


This initializer was added to avoid -Wmaybe-uninitialized (gcc) or
-Wsometimes-uninitialized (clang) warning.

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

Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
---

Changes in v2:
- Split into a separate patch

scripts/mod/modpost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index c13bc9095df3..3233946fa5f6 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -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;

--
2.40.1