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
This commit is contained in:
Albrecht Schlosser
2015-03-30 11:42:29 +00:00
parent b4a0961b88
commit b712d85d28
+2 -2
View File
@@ -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);