From b712d85d280e17ee24f728ada654dbec2641f8e9 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 30 Mar 2015 11:42:29 +0000 Subject: Fix two Linux (gcc/g++) compilation warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/print_panel.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/print_panel.cxx b/src/print_panel.cxx index 948ee12b5..f2b7a7494 100644 --- a/src/print_panel.cxx +++ b/src/print_panel.cxx @@ -562,7 +562,7 @@ printing_style print_load() { // return whether SystemV or BSD printing style is p = line + strlen(line) - 1; if (*p == '\n' && p > line) p--; if (*p != '\\') break; - fgets(line, sizeof(line),lpstat); + if (fgets(line, sizeof(line),lpstat)==0) { /* ignore */ } } } fclose(lpstat); @@ -600,7 +600,7 @@ void print_update_status() { pclose(lpstat); snprintf(command, sizeof(command), "lpq -P%s", printer); // try next with BSD printing system if ((lpstat = popen(command, "r")) != NULL) { - fgets(status, sizeof(status), lpstat); + if (fgets(status, sizeof(status), lpstat)==0) { /* ignore */ } } } pclose(lpstat); -- cgit v1.2.3