diff --git a/libretro-common/formats/png/rpng.c b/libretro-common/formats/png/rpng.c index bae61140d7..57c26a7144 100644 --- a/libretro-common/formats/png/rpng.c +++ b/libretro-common/formats/png/rpng.c @@ -992,10 +992,12 @@ bool rpng_iterate_image(rpng_t *rpng) goto error; #if 0 +#ifdef RPNG_TEST for (i = 0; i < 4; i++) { fprintf(stderr, "chunktype: %c\n", chunk.type[i]); } +#endif #endif switch (png_chunk_type(&chunk)) diff --git a/libretro-common/streams/file_stream.c b/libretro-common/streams/file_stream.c index b8d4c49ece..a5da2119d7 100644 --- a/libretro-common/streams/file_stream.c +++ b/libretro-common/streams/file_stream.c @@ -503,8 +503,8 @@ int64_t filestream_read_file(const char *path, void **buf, int64_t *len) if (!file) { - fprintf(stderr, "Failed to open %s: %s\n", path, strerror(errno)); - goto error; + *buf = NULL; + return 0; } content_buf_size = filestream_get_size(file); @@ -521,10 +521,7 @@ int64_t filestream_read_file(const char *path, void **buf, int64_t *len) ret = filestream_read(file, content_buf, (int64_t)content_buf_size); if (ret < 0) - { - fprintf(stderr, "Failed to read %s: %s\n", path, strerror(errno)); goto error; - } filestream_close(file); diff --git a/libretro-common/streams/rzip_stream.c b/libretro-common/streams/rzip_stream.c index 5614939a8a..df9539b542 100644 --- a/libretro-common/streams/rzip_stream.c +++ b/libretro-common/streams/rzip_stream.c @@ -648,8 +648,8 @@ bool rzipstream_read_file(const char *path, void **buf, int64_t *len) if (!stream) { - fprintf(stderr, "[rzipstream] Failed to open file: %s\n", path ? path : ""); - goto error; + *buf = NULL; + return false; } /* Get file size */ @@ -671,10 +671,7 @@ bool rzipstream_read_file(const char *path, void **buf, int64_t *len) bytes_read = rzipstream_read(stream, content_buf, content_buf_size); if (bytes_read < 0) - { - fprintf(stderr, "[rzipstream] Failed to read file: %s\n", path); goto error; - } /* Close file */ rzipstream_close(stream); @@ -888,28 +885,19 @@ bool rzipstream_write_file(const char *path, const void *data, int64_t len) stream = rzipstream_open(path, RETRO_VFS_FILE_ACCESS_WRITE); if (!stream) - { - fprintf(stderr, "[rzipstream] Failed to open file: %s\n", path ? path : ""); return false; - } /* Write contents of data buffer to file */ bytes_written = rzipstream_write(stream, data, len); /* Close file */ if (rzipstream_close(stream) == -1) - { - fprintf(stderr, "[rzipstream] Failed to close file: %s\nData will be lost...\n", path); return false; - } /* Check that the correct number of bytes * were written */ if (bytes_written != len) - { - fprintf(stderr, "[rzipstream] Wrote incorrect number of bytes to file: %s\n", path); return false; - } return true; }