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.
This commit is contained in:
Fabian Knorr 2024-11-13 10:15:05 +01:00
parent 16ef91c238
commit 7ef690bd5a

View File

@ -85,7 +85,7 @@ void SysPower::ScanDirectory( const char* path, int parent )
FILE* f = fopen( tmp, "r" ); FILE* f = fopen( tmp, "r" );
if( f ) if( f )
{ {
fscanf( f, "%" PRIu64, &maxRange ); (void)fscanf( f, "%" PRIu64, &maxRange );
fclose( f ); fclose( f );
} }
} }