mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-25 11:50:16 +01:00
test: Handle error in fgets call in ps-eps test
Most likely this is just a theoretical problem since we just checked feof, but this quells the following warning: ps-eps.c:216:8: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
1b522f81e2
commit
0723290a6f
1 changed files with 5 additions and 1 deletions
|
|
@ -213,7 +213,11 @@ check_bbox (cairo_test_context_t *ctx,
|
|||
bbox_pass = FALSE;
|
||||
page_bbox_pass = FALSE;
|
||||
while (!feof(f)) {
|
||||
fgets (buf, sizeof(buf), f);
|
||||
if (fgets (buf, sizeof(buf), f) == (char *)EOF) {
|
||||
cairo_test_log (ctx, "Error: Unexpected EOF in %s\n",
|
||||
filename);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strncmp (buf, DOCUMENT_BBOX, strlen (DOCUMENT_BBOX)) == 0) {
|
||||
ret = sscanf (buf+strlen (DOCUMENT_BBOX), "%d %d %d %d", &llx, &lly, &urx, &ury);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue