From e46eea0b5bdef28f5c42e4d7764b030679479354 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Fri, 9 May 2014 15:34:54 -0700 Subject: gralloc: don't initialize reserved_proc gcc supports designated initializers in C++ mode as an extension, but *only* when all of the specified fields are at the beginning of the struct. Hence initializing reserved_proc breaks compilation when new procs are added. Initializing reserved_proc makes a (spurious) warning go away, so instead directly suppress that warning. Change-Id: I279b7070b1aa7068c23fb59422589ff31980432d Signed-off-by: Greg Hackmann --- opengl/system/gralloc/Android.mk | 1 + opengl/system/gralloc/gralloc.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/opengl/system/gralloc/Android.mk b/opengl/system/gralloc/Android.mk index 8705602..71ac2f2 100644 --- a/opengl/system/gralloc/Android.mk +++ b/opengl/system/gralloc/Android.mk @@ -7,6 +7,7 @@ $(call emugl-import,libGLESv1_enc lib_renderControl_enc libOpenglSystemCommon) $(call emugl-set-shared-library-subpath,hw) LOCAL_CFLAGS += -DLOG_TAG=\"gralloc_goldfish\" +LOCAL_CFLAGS += -Wno-missing-field-initializers LOCAL_SRC_FILES := gralloc.cpp diff --git a/opengl/system/gralloc/gralloc.cpp b/opengl/system/gralloc/gralloc.cpp index f6f448c..442bbcc 100644 --- a/opengl/system/gralloc/gralloc.cpp +++ b/opengl/system/gralloc/gralloc.cpp @@ -1007,7 +1007,6 @@ struct private_module_t HAL_MODULE_INFO_SYM = { unlock: gralloc_unlock, perform: NULL, lock_ycbcr: gralloc_lock_ycbcr, - reserved_proc: {0, } } }; -- cgit v1.2.3