diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-02-21 15:19:02 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-02-21 15:19:02 +0100 |
| commit | f9255e375cb4751404e33837cdddd6f2d31d96b9 (patch) | |
| tree | f165b6e33a4b3b10f5a7881774a0cfc03bd25cc0 /src | |
| parent | 1c2dcdb4dcf09b1154e3514e9363710f0f10f54a (diff) | |
Remove compilation warning with -Wunused-result
Warning was: ignoring return value of ‘char* fgets(char*, int, FILE*)’
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Screen_Driver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index 660ed03b0..1afbebacd 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -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; |
