diff --git a/src/generic/evas/pdf/main.cpp b/src/generic/evas/pdf/main.cpp index 8623179b71..eab137b8ee 100644 --- a/src/generic/evas/pdf/main.cpp +++ b/src/generic/evas/pdf/main.cpp @@ -321,7 +321,12 @@ main(int argc, char **argv) // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(data, crop_width * crop_height * sizeof(DATA32), 1, stdout); + if (fwrite(data, crop_width * crop_height * sizeof(DATA32), 1, stdout) != 1) + { + // nothing much to do, the receiver will simply ignore the + // data as it's too short + D("fwrite failed (%d bytes): %m\n", crop_width * crop_height * sizeof(DATA32)); + } } shm_free(); } diff --git a/src/generic/evas/ps/main.c b/src/generic/evas/ps/main.c index 48e8a4b6f6..c5b8a18ff6 100644 --- a/src/generic/evas/ps/main.c +++ b/src/generic/evas/ps/main.c @@ -276,7 +276,12 @@ main(int argc, char **argv) // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(data, width * height * sizeof(DATA32), 1, stdout); + if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1) + { + // nothing much to do, the receiver will simply ignore the + // data as it's too short + D("fwrite failed (%d bytes): %m\n", width * height * sizeof(DATA32)); + } } shm_free(); } diff --git a/src/generic/evas/svg/main.c b/src/generic/evas/svg/main.c index 8c46708d92..f1973303ee 100644 --- a/src/generic/evas/svg/main.c +++ b/src/generic/evas/svg/main.c @@ -218,7 +218,12 @@ int main(int argc, char **argv) else { printf("data\n"); - fwrite(shm_addr, width * height * sizeof(DATA32), 1, stdout); + if (fwrite(shm_addr, width * height * sizeof(DATA32), 1, stdout) != 1) + { + // nothing much to do, the receiver will simply ignore the + // data as it's too short + //D("fwrite failed (%d bytes): %m\n", width * height * sizeof(DATA32)); + } } shm_free(); } diff --git a/src/generic/evas/xcf/main.c b/src/generic/evas/xcf/main.c index 4de03f8be8..c5ef6a82d6 100644 --- a/src/generic/evas/xcf/main.c +++ b/src/generic/evas/xcf/main.c @@ -1723,7 +1723,12 @@ main(int argc, char **argv) // could also to "tmpfile %s\n" like shmfile but just // a mmaped tmp file on the system printf("data\n"); - fwrite(image->data, w * h * sizeof(DATA32), 1, stdout); + if (fwrite(image->data, w * h * sizeof(DATA32), 1, stdout) != 1) + { + // nothing much to do, the receiver will simply ignore the + // data as it's too short + D("fwrite failed (%d bytes): %m\n", w * h * sizeof(DATA32)); + } } shm_free(); }