From 7ef690bd5a7ad21dcb0c45e60a6d80443edab30a Mon Sep 17 00:00:00 2001 From: Fabian Knorr Date: Wed, 13 Nov 2024 10:15:05 +0100 Subject: [PATCH] Silence GCC fscanf warning in TracySysPower.cpp fscanf is [[warn_unused_result]], which triggers -Wunused-result. In this instance it is correct for maxRange to remain unchanged if reading from sysfs should fail for some reason. --- public/client/TracySysPower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/client/TracySysPower.cpp b/public/client/TracySysPower.cpp index bd5939da..6ad1d647 100644 --- a/public/client/TracySysPower.cpp +++ b/public/client/TracySysPower.cpp @@ -85,7 +85,7 @@ void SysPower::ScanDirectory( const char* path, int parent ) FILE* f = fopen( tmp, "r" ); if( f ) { - fscanf( f, "%" PRIu64, &maxRange ); + (void)fscanf( f, "%" PRIu64, &maxRange ); fclose( f ); } }