summaryrefslogtreecommitdiff
path: root/src/print_panel.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-03-30 11:42:29 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-03-30 11:42:29 +0000
commitb712d85d280e17ee24f728ada654dbec2641f8e9 (patch)
tree5f2f6c8e679d9f39119a5342b4a37128291a58eb /src/print_panel.cxx
parentb4a0961b88aa7b1c44b0a273d8024a09890fff05 (diff)
Fix two Linux (gcc/g++) compilation warnings.
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
Diffstat (limited to 'src/print_panel.cxx')
-rw-r--r--src/print_panel.cxx4
1 files 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);