From 8fcc756d6cc921207a2c81fc01e81d54a48336e6 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Mon, 9 Nov 2020 13:01:06 -0500 Subject: [PATCH] Initialize variable in runtime/softfloat.c to avoid RHEL8 -Werror issue Make sure that the variable is initialized to something to avoid the following error when running the testsuite on RHEL8: attempting command stap -p4 floatingpoint.stp -c "stap --benchmark-sdt" OUT In file included from /tmp/stapBRN9va/stap_825f154f474bfd5b2080a28426f65178_4743_src.c:37: /usr/share/systemtap/runtime/softfloat.c: In function 'softfloat_shiftRightJamM': /usr/share/systemtap/runtime/softfloat.c:132:34: error: 'ptr' may be used uninitialized in this function [-Werror=maybe-uninitialized] uint32_t wordJam, wordDist, *ptr; ^~~ cc1: all warnings being treated as errors make[3]: *** [scripts/Makefile.build:315: /tmp/stapBRN9va/stap_825f154f474bfd5b2080a28426f65178_4743_src.o] Error 1 make[2]: *** [Makefile:1544: _module_/tmp/stapBRN9va] Error 2 WARNING: kbuild exited with status: 2 Pass 4: compilation failed. [man error::pass4] child process exited abnormally RC 1 FAIL: systemtap.examples/general/floatingpoint build --- runtime/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/softfloat.c b/runtime/softfloat.c index 61a42e963..7122c6625 100644 --- a/runtime/softfloat.c +++ b/runtime/softfloat.c @@ -129,7 +129,7 @@ void uint32_t *zPtr ) { - uint32_t wordJam, wordDist, *ptr; + uint32_t wordJam, wordDist, *ptr=0; uint_fast8_t i, innerDist; wordJam = 0; -- 2.43.5