Bug 462007

Summary: Implicit int in none/tests/faultstatus.c
Product: [Developer tools] valgrind Reporter: Florian Weimer <fweimer>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: mark
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Florian Weimer 2022-11-18 18:52:29 UTC
There is a definition in a test that is not accepted by C99 compilers (implicit ints were removed in that language revision).

This should fix it:

diff --git a/none/tests/faultstatus.c b/none/tests/faultstatus.c
index 458ea8264..92a8350ab 100644
--- a/none/tests/faultstatus.c
+++ b/none/tests/faultstatus.c
@@ -190,7 +190,7 @@ int main()
        return 0;
 }
 
-static volatile s_zero;
+static volatile int s_zero;
 
 static int zero()
 {
Comment 1 Mark Wielaard 2022-11-18 19:18:28 UTC
Thanks, that was not intended. Fixed by:

commit 0811a612dd7ce0c02a5dd699b34e660c742df8fe (HEAD -> master)
Author: Mark Wielaard <mark@klomp.org>
Date:   Fri Nov 18 20:12:06 2022 +0100

    Implicit int in none/tests/faultstatus.c
    
    There is a definition in faultstatus.c that is not accepted by
    C99 compilers (implicit ints were removed in that language revision).
    
    https://bugs.kde.org/show_bug.cgi?id=462007