diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 15:54:38 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 15:54:38 +1100 |
| commit | 30b5750137ec08d0e5da43d782091ed9b6ac871f (patch) | |
| tree | 2db8a3eb62a6d33842adba16b81d3d94d25f016d /src/format | |
| parent | 34ff5eda1200749e3c7eb5bbe609596928539cd2 (diff) | |
refactor(png): Cast unused variables to void to avoid unused errors
Diffstat (limited to 'src/format')
| -rw-r--r-- | src/format/image/png.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/format/image/png.c b/src/format/image/png.c index 93e1521..3aaaf69 100644 --- a/src/format/image/png.c +++ b/src/format/image/png.c @@ -48,9 +48,6 @@ ff_result ff_open_png(ff_stream *stream, ff_png_ctx **out_ctx) if (ctx->raw->read == NULL) { ff_dprintf("png: stream failed to read\n"); free(ctx); - ctx->last_error = FF_RESULT_ERROR_READ_FILE_FAILURE; - - ctx->last_error = FF_RESULT_ERROR_READ_FILE_FAILURE; return FF_RESULT_ERROR_READ_FILE_FAILURE; } @@ -336,7 +333,9 @@ ff_result ff_png_data_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) } ff_result ff_png_end_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) -{ +{ + (void)buf; // Unused (for now) + ff_dprintf("png: IEND chunk received (len=%zu)\n", len); ff_dprintf("png: all chunks received\n"); @@ -347,6 +346,8 @@ ff_result ff_png_end_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) ff_result ff_png_trans_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) { + (void)buf; // Unused (for now) + ff_dprintf("png: PLTE chunk received (len=%zu)\n", len); if (ctx->color_type == 0) { // Grayscale @@ -356,6 +357,7 @@ ff_result ff_png_trans_handler(uint8_t *buf, size_t len, ff_png_ctx *ctx) return FF_RESULT_ERROR_INVALID_FILE; } } - + (void)buf; // Unused (for now) + return FF_RESULT_WARN_NO_IMPL; } |
