fix compiler warning about unused result of fscanf

This commit is contained in:
Linus Dierheimer
2021-07-02 23:07:25 +02:00
parent 7b5af1b133
commit 1717b51807
+3 -3
View File
@@ -114,9 +114,9 @@ static void printResolutionDRMBackend(FFinstance* instance)
result->width = 0;
result->height = 0;
result->refreshRate = 0;
fscanf(modeFile, "%ix%i", &result->width, &result->height);
if(result->width == 0 || result->height == 0)
int scanned = fscanf(modeFile, "%ix%i", &result->width, &result->height);
if(scanned < 2 || result->width == 0 || result->height == 0)
--modes.length;
fclose(modeFile);
@@ -349,7 +349,7 @@ static bool printResolutionXrandrBackend(FFinstance* instance)
ffListInitA(&data.results, sizeof(ResolutionResult), 4);
for(int i = 0; i < ScreenCount(data.display); i++)
xrandrHandleScreen(&data, ScreenOfDisplay(data.display, i));
xrandrHandleScreen(&data, ScreenOfDisplay(data.display, i));
if(data.results.length == 0)
{