fix warnings for vs9 x64

Change-Id: Id022d48a0a898a8bf7dce437b078da6c98afd75c
This commit is contained in:
Pascal Massimino 2013-06-01 22:48:08 -07:00
parent af358e68ed
commit 438946dcc6

View File

@ -242,10 +242,10 @@ static int WriteBMP(FILE* fout, const WebPDecBuffer* const buffer) {
const uint32_t height = buffer->height; const uint32_t height = buffer->height;
const uint8_t* const rgba = buffer->u.RGBA.rgba; const uint8_t* const rgba = buffer->u.RGBA.rgba;
const int stride = buffer->u.RGBA.stride; const int stride = buffer->u.RGBA.stride;
const size_t bytes_per_px = has_alpha ? 4 : 3; const uint32_t bytes_per_px = has_alpha ? 4 : 3;
uint32_t y; uint32_t y;
const int line_size = bytes_per_px * width; const uint32_t line_size = bytes_per_px * width;
const int bmp_stride = (line_size + 3) & ~3; // pad to 4 const uint32_t bmp_stride = (line_size + 3) & ~3; // pad to 4
const uint32_t total_size = bmp_stride * height + BMP_HEADER_SIZE; const uint32_t total_size = bmp_stride * height + BMP_HEADER_SIZE;
uint8_t bmp_header[BMP_HEADER_SIZE] = { 0 }; uint8_t bmp_header[BMP_HEADER_SIZE] = { 0 };