OSDN Git Service

libvulkan: Fix for -Wcast-calling-convention
authorChia-I Wu <olv@google.com>
Fri, 22 Jul 2016 02:36:33 +0000 (10:36 +0800)
committerChia-I Wu <olv@google.com>
Fri, 22 Jul 2016 06:55:29 +0000 (06:55 +0000)
It should be harmless, as NoOp does not use any argument and should never
be reached.

Bug: 30290462
Change-Id: I0592c3ce10c510713525b5aa0bd38a2f9adc5898

vulkan/libvulkan/Android.mk
vulkan/libvulkan/stubhal.cpp

index 4d2cffc..f1155ca 100644 (file)
@@ -25,8 +25,7 @@ LOCAL_CFLAGS := -DLOG_TAG=\"vulkan\" \
        -Weverything -Werror \
        -Wno-padded \
        -Wno-switch-enum \
-       -Wno-undef \
-       -Wno-cast-calling-convention
+       -Wno-undef
 
 #LOCAL_CFLAGS += -DLOG_NDEBUG=0
 LOCAL_CPPFLAGS := -std=c++14 \
index a74d370..869317b 100644 (file)
@@ -43,7 +43,7 @@ static std::mutex g_instance_mutex;
 static std::bitset<kMaxInstances> g_instance_used(false);
 static std::array<hwvulkan_dispatch_t, kMaxInstances> g_instances;
 
-[[noreturn]] void NoOp() {
+[[noreturn]] VKAPI_ATTR void NoOp() {
     LOG_ALWAYS_FATAL("invalid stub function called");
 }