diff --git a/libexfat/compiler.h b/libexfat/compiler.h index 88d3d7ce..f5648a82 100644 --- a/libexfat/compiler.h +++ b/libexfat/compiler.h @@ -33,6 +33,7 @@ #define PRINTF __attribute__((format(printf, 1, 2))) #define NORETURN __attribute__((noreturn)) #define PACKED __attribute__((packed)) +#undef UNUSED #define UNUSED __attribute__((unused)) #if __has_extension(c_static_assert) #define USE_C11_STATIC_ASSERT @@ -43,6 +44,7 @@ #define PRINTF __attribute__((format(printf, 1, 2))) #define NORETURN __attribute__((noreturn)) #define PACKED __attribute__((packed)) +#undef UNUSED #define UNUSED __attribute__((unused)) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) #define USE_C11_STATIC_ASSERT diff --git a/libexfat/exfat.h b/libexfat/exfat.h index 939fec06..857846e5 100644 --- a/libexfat/exfat.h +++ b/libexfat/exfat.h @@ -28,7 +28,6 @@ /* Android.bp is used instead of autotools when targeting Android */ #include "config.h" #endif -#include "compiler.h" #include "exfatfs.h" #include #include diff --git a/libexfat/lookup.c b/libexfat/lookup.c index 50ad31f5..0f9dc803 100644 --- a/libexfat/lookup.c +++ b/libexfat/lookup.c @@ -219,4 +219,5 @@ int exfat_split(struct exfat* ef, struct exfat_node** parent, *parent = *node; } exfat_bug("impossible"); + return -ENOENT; } diff --git a/libexfat/repair.c b/libexfat/repair.c index 8e8e9628..39d53de7 100644 --- a/libexfat/repair.c +++ b/libexfat/repair.c @@ -58,6 +58,7 @@ bool exfat_ask_to_fix(const struct exfat* ef) return yeah; } exfat_bug("invalid repair option value: %d", ef->repair); + return false; } bool exfat_fix_invalid_vbr_checksum(const struct exfat* ef, void* sector, diff --git a/mkfs/mkexfat.c b/mkfs/mkexfat.c index eadbe968..cf2868d9 100644 --- a/mkfs/mkexfat.c +++ b/mkfs/mkexfat.c @@ -159,4 +159,5 @@ off_t get_position(const struct fs_object* object) position += (*pp)->get_size(); } exfat_bug("unknown object"); + return 0; }