display: Fix warnings, make warnings as errors

Change-Id: I61f22765b04112be48e62135db930c415c9c7d37
This commit is contained in:
Naseer Ahmed
2012-07-15 23:56:21 -07:00
committed by Brian Muramatsu
parent 01d3fd3318
commit b16edac510
4 changed files with 9 additions and 7 deletions

View File

@@ -15,6 +15,8 @@ common_libs := liblog libutils libcutils libhardware
#Common C flags #Common C flags
common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers
common_flags += -Werror
ifeq ($(ARCH_ARM_HAVE_NEON),true) ifeq ($(ARCH_ARM_HAVE_NEON),true)
common_flags += -D__ARM_HAVE_NEON common_flags += -D__ARM_HAVE_NEON
endif endif

View File

@@ -229,10 +229,10 @@ static int msm_copybit(struct copybit_context_t *dev, void const *list)
#if DEBUG_MDP_ERRORS #if DEBUG_MDP_ERRORS
struct mdp_blit_req_list const* l = struct mdp_blit_req_list const* l =
(struct mdp_blit_req_list const*)list; (struct mdp_blit_req_list const*)list;
for (int i=0 ; i<l->count ; i++) { for (unsigned int i=0 ; i<l->count ; i++) {
ALOGE("%d: src={w=%d, h=%d, f=%d, rect={%d,%d,%d,%d}}\n" ALOGE("%d: src={w=%d, h=%d, f=%d, rect={%d,%d,%d,%d}}\n"
" dst={w=%d, h=%d, f=%d, rect={%d,%d,%d,%d}}\n" " dst={w=%d, h=%d, f=%d, rect={%d,%d,%d,%d}}\n"
" flags=%08lx" " flags=%08x"
, ,
i, i,
l->req[i].src.width, l->req[i].src.width,
@@ -391,8 +391,8 @@ static int stretch_copybit(
} }
} }
if (src_rect->l < 0 || src_rect->r > src->w || if (src_rect->l < 0 || src_rect->r > (int)src->w ||
src_rect->t < 0 || src_rect->b > src->h) { src_rect->t < 0 || src_rect->b > (int)src->h) {
// this is always invalid // this is always invalid
ALOGE ("%s : Invalid source rectangle : src_rect l %d t %d r %d b %d",\ ALOGE ("%s : Invalid source rectangle : src_rect l %d t %d r %d b %d",\
__FUNCTION__, src_rect->l, src_rect->t, src_rect->r, src_rect->b); __FUNCTION__, src_rect->l, src_rect->t, src_rect->r, src_rect->b);

View File

@@ -445,7 +445,7 @@ static int set_image( uint32 surfaceId, const struct copybit_image_t *rhs,
info.height = rhs->h; info.height = rhs->h;
info.format = rhs->format; info.format = rhs->format;
yuvPlaneInfo yuvInfo; yuvPlaneInfo yuvInfo = {0};
status = calculate_yuv_offset_and_stride(info, yuvInfo); status = calculate_yuv_offset_and_stride(info, yuvInfo);
if(status != COPYBIT_SUCCESS) { if(status != COPYBIT_SUCCESS) {
ALOGE("%s: calculate_yuv_offset_and_stride error", __FUNCTION__); ALOGE("%s: calculate_yuv_offset_and_stride error", __FUNCTION__);
@@ -700,7 +700,7 @@ static void set_rects(struct copybit_context_t *ctx,
/** copy the bits */ /** copy the bits */
static int msm_copybit(struct copybit_context_t *dev, blitlist *list, uint32 target) static int msm_copybit(struct copybit_context_t *dev, blitlist *list, uint32 target)
{ {
int objects; unsigned int objects;
for(objects = 0; objects < list->count; objects++) { for(objects = 0; objects < list->count; objects++) {
list->blitObjects[objects].next = &(list->blitObjects[objects+1]); list->blitObjects[objects].next = &(list->blitObjects[objects+1]);

View File

@@ -152,7 +152,7 @@ int IonController::allocate(alloc_data& data, int usage)
IMemAlloc* IonController::getAllocator(int flags) IMemAlloc* IonController::getAllocator(int flags)
{ {
IMemAlloc* memalloc; IMemAlloc* memalloc = NULL;
if (flags & private_handle_t::PRIV_FLAGS_USES_ION) { if (flags & private_handle_t::PRIV_FLAGS_USES_ION) {
memalloc = mIonAlloc; memalloc = mIonAlloc;
} else { } else {