Bug 462007 - Implicit int in none/tests/faultstatus.c
Summary: Implicit int in none/tests/faultstatus.c
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-18 18:52 UTC by Florian Weimer
Modified: 2022-11-18 19:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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