From 05aacf77c25fffebfbb03f82f147617dc6882eb1 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 25 Nov 2013 20:53:15 -0800 Subject: [PATCH] mux: add some missing casts + fix a return value + fix a param type Change-Id: I8bb7a4dc4c76b11140f8693c909aeb10f660e6e5 --- src/mux/muxedit.c | 2 +- src/mux/muxinternal.c | 4 ++-- src/mux/muxread.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mux/muxedit.c b/src/mux/muxedit.c index 1a026b45..4834c9f3 100644 --- a/src/mux/muxedit.c +++ b/src/mux/muxedit.c @@ -414,7 +414,7 @@ static WebPMuxError GetImageInfo(const WebPMuxImage* const wpi, // Get width and height from VP8/VP8L chunk. if (width != NULL) *width = wpi->width_; if (height != NULL) *height = wpi->height_; - return 1; + return WEBP_MUX_OK; } static WebPMuxError GetImageCanvasWidthHeight( diff --git a/src/mux/muxinternal.c b/src/mux/muxinternal.c index 0a620ec9..af44bdb9 100644 --- a/src/mux/muxinternal.c +++ b/src/mux/muxinternal.c @@ -70,7 +70,7 @@ WebPChunk* ChunkRelease(WebPChunk* const chunk) { CHUNK_INDEX ChunkGetIndexFromTag(uint32_t tag) { int i; for (i = 0; kChunks[i].tag != NIL_TAG; ++i) { - if (tag == kChunks[i].tag) return i; + if (tag == kChunks[i].tag) return (CHUNK_INDEX)i; } return IDX_UNKNOWN; } @@ -451,7 +451,7 @@ static int IsNotCompatible(int feature, int num_items) { // On success returns WEBP_MUX_OK and stores the chunk count in *num. static WebPMuxError ValidateChunk(const WebPMux* const mux, CHUNK_INDEX idx, WebPFeatureFlags feature, - WebPFeatureFlags vp8x_flags, + uint32_t vp8x_flags, int max, int* num) { const WebPMuxError err = WebPMuxNumChunks(mux, kChunks[idx].id, num); diff --git a/src/mux/muxread.c b/src/mux/muxread.c index 39d07d43..3b414667 100644 --- a/src/mux/muxread.c +++ b/src/mux/muxread.c @@ -505,7 +505,7 @@ WebPMuxError WebPMuxGetAnimationParams(const WebPMux* mux, static CHUNK_INDEX ChunkGetIndexFromId(WebPChunkId id) { int i; for (i = 0; kChunks[i].id != WEBP_CHUNK_NIL; ++i) { - if (id == kChunks[i].id) return i; + if (id == kChunks[i].id) return (CHUNK_INDEX)i; } return IDX_NIL; }