Remove compilation warning with -Wunused-result

Warning was: ignoring return value of ‘char* fgets(char*, int, FILE*)’
This commit is contained in:
ManoloFLTK 2019-02-21 15:19:02 +01:00
parent 1c2dcdb4dc
commit f9255e375c

View File

@ -1223,8 +1223,8 @@ static bool usemonitors_xml(float &factor, int width, int height) {
}
if ( in_config && (p = strstr(line, "<width>")) && strstr(p, "</width>") ) {
sscanf(p + 7, "%d", &w);
fgets(line, sizeof(line), in);
p = strstr(line, "<height>");
p = fgets(line, sizeof(line), in);
if (p) p = strstr(line, "<height>");
if (p) sscanf(p+8, "%d", &h);
if (p && w == width && h == height) {
found = true;