From a7cc729126d2ffb1936d81b4a583357c7270070f Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Wed, 25 Jul 2012 14:18:21 -0700 Subject: [PATCH] fix type and conversion warnings avoids warning messages on MSVC mainly Change-Id: I80f281d5263a54c6a224bb095175497cf2f4ce1e --- src/enc/alpha.c | 2 +- src/enc/vp8l.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/enc/alpha.c b/src/enc/alpha.c index 62d5c8fa..97538da9 100644 --- a/src/enc/alpha.c +++ b/src/enc/alpha.c @@ -268,7 +268,7 @@ static int EncodeAlpha(VP8Encoder* const enc, *output_size = VP8BitWriterSize(&bw); *output = VP8BitWriterBuf(&bw); if (pic->stats != NULL) { // need stats? - pic->stats->coded_size += *output_size; + pic->stats->coded_size += (int)(*output_size); enc->sse_[3] = sse; } } diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index afe810ed..82bef500 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -1030,7 +1030,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, stats->transform_bits = enc->transform_bits_; stats->cache_bits = enc->cache_bits_; stats->palette_size = enc->palette_size_; - stats->lossless_size = VP8LBitWriterNumBytes(bw) - byte_position; + stats->lossless_size = (int)(VP8LBitWriterNumBytes(bw) - byte_position); } Error: @@ -1065,11 +1065,11 @@ int VP8LEncodeImage(const WebPConfig* const config, if (picture->stats != NULL) { WebPAuxStats* const stats = picture->stats; memset(stats, 0, sizeof(*stats)); - stats->PSNR[0] = 99.; - stats->PSNR[1] = 99.; - stats->PSNR[2] = 99.; - stats->PSNR[3] = 99.; - stats->PSNR[4] = 99.; + stats->PSNR[0] = 99.f; + stats->PSNR[1] = 99.f; + stats->PSNR[2] = 99.f; + stats->PSNR[3] = 99.f; + stats->PSNR[4] = 99.f; } // Write image size.