OSDN Git Service

gralloc: don't initialize reserved_proc
authorGreg Hackmann <ghackmann@google.com>
Fri, 9 May 2014 22:34:54 +0000 (15:34 -0700)
committerGreg Hackmann <ghackmann@google.com>
Fri, 9 May 2014 22:53:18 +0000 (15:53 -0700)
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 <ghackmann@google.com>
system/gralloc/Android.mk
system/gralloc/gralloc.cpp

index 8705602..71ac2f2 100644 (file)
@@ -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
 
index f6f448c..442bbcc 100644 (file)
@@ -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, }
     }
 };