Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 949aa238 authored by Dan Albert's avatar Dan Albert
Browse files

Fix some clang compilation issues.

Use expected inline behavior with clang.

GCC defaults to -std=gnu90, giving C89 inline semantics with GNU
extensions. Clang defaults to C99. Explicitly use gnu90.

Mark an unused parameter as __unused.

Fix some incorrect casts.

Change-Id: I05b95585d5e3688eda71769b63b6b8a9237bcaf4
parent 2c805883
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ int trigger_gpt_layout(struct GPT_content *table) {
    return 0;
}

int trigger_oem_cmd(const char *arg, const char **response) {
int trigger_oem_cmd(const char *arg, const char **response __unused) {
    KLOG_DEBUG("fastbootd", "%s: %s", __func__, arg);
    return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ LOCAL_CFLAGS_x86_64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32

LOCAL_C_INCLUDES := $(libcutils_c_includes)
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_CFLAGS += $(targetSmpFlag) -Werror
LOCAL_CFLAGS += $(targetSmpFlag) -Werror -std=gnu90
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_STATIC_LIBRARY)

+2 −2
Original line number Diff line number Diff line
@@ -201,8 +201,8 @@ int CodeCache::cache( const AssemblyKeyBase& keyBase,
        mCacheInUse += assemblySize;
        mWhen++;
        // synchronize caches...
        void* base = assembly->base();
        void* curr = (uint8_t*)base + assembly->size();
        char* base = reinterpret_cast<char*>(assembly->base());
        char* curr = reinterpret_cast<char*>(base + assembly->size());
        __builtin___clear_cache(base, curr);
    }