mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 23:06:54 +08:00
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:
+2
-2
@@ -562,7 +562,7 @@ printing_style print_load() { // return whether SystemV or BSD printing style is
|
|||||||
p = line + strlen(line) - 1;
|
p = line + strlen(line) - 1;
|
||||||
if (*p == '\n' && p > line) p--;
|
if (*p == '\n' && p > line) p--;
|
||||||
if (*p != '\\') break;
|
if (*p != '\\') break;
|
||||||
fgets(line, sizeof(line),lpstat);
|
if (fgets(line, sizeof(line),lpstat)==0) { /* ignore */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(lpstat);
|
fclose(lpstat);
|
||||||
@@ -600,7 +600,7 @@ void print_update_status() {
|
|||||||
pclose(lpstat);
|
pclose(lpstat);
|
||||||
snprintf(command, sizeof(command), "lpq -P%s", printer); // try next with BSD printing system
|
snprintf(command, sizeof(command), "lpq -P%s", printer); // try next with BSD printing system
|
||||||
if ((lpstat = popen(command, "r")) != NULL) {
|
if ((lpstat = popen(command, "r")) != NULL) {
|
||||||
fgets(status, sizeof(status), lpstat);
|
if (fgets(status, sizeof(status), lpstat)==0) { /* ignore */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pclose(lpstat);
|
pclose(lpstat);
|
||||||
|
|||||||
Reference in New Issue
Block a user