From 53a7923b159626a6a598a7856a9830df4bbb560c Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Tue, 7 Jan 2014 06:06:01 +0000 Subject: [PATCH] cast malloc to uint8* BUG=303 TESTED=visual c higher warnings R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/6639004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@955 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/convert_to_argb.cc | 2 +- source/convert_to_i420.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.chromium b/README.chromium index 1923a4e0e..cf282983c 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 953 +Version: 955 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 9af5565b5..3a19a559b 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 953 +#define LIBYUV_VERSION 955 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/convert_to_argb.cc b/source/convert_to_argb.cc index d232aab14..210b67c5a 100644 --- a/source/convert_to_argb.cc +++ b/source/convert_to_argb.cc @@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size, int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height; if (need_buf) { int argb_size = crop_width * abs_crop_height * 4; - rotate_buffer = malloc(argb_size); + rotate_buffer = (uint8*)malloc(argb_size); if (!rotate_buffer) { return 1; // Out of memory runtime error. } diff --git a/source/convert_to_i420.cc b/source/convert_to_i420.cc index 8e469484a..3420c9dc3 100644 --- a/source/convert_to_i420.cc +++ b/source/convert_to_i420.cc @@ -71,7 +71,7 @@ int ConvertToI420(const uint8* sample, if (need_buf) { int y_size = crop_width * abs_crop_height; int uv_size = ((crop_width + 1) / 2) * ((abs_crop_height + 1) / 2); - rotate_buffer = malloc(y_size + uv_size * 2); + rotate_buffer = (uint8*)malloc(y_size + uv_size * 2); if (!rotate_buffer) { return 1; // Out of memory runtime error. }