From 9e75edd18c00a0bf56441809a55c3d323480a366 Mon Sep 17 00:00:00 2001 From: Michal Wysoczanski Date: Thu, 30 May 2019 00:08:58 +0200 Subject: [PATCH 1/2] Explicitly cast void pointer to const char *. Signed-off-by: Michal Wysoczanski --- inc/ocf_volume.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/ocf_volume.h b/inc/ocf_volume.h index ed1b6b5..e074b5e 100644 --- a/inc/ocf_volume.h +++ b/inc/ocf_volume.h @@ -165,7 +165,7 @@ static inline int ocf_uuid_set_str(ocf_uuid_t uuid, char *str) */ static inline const char *ocf_uuid_to_str(const struct ocf_volume_uuid *uuid) { - return uuid->data; + return (const char *)uuid->data; } /** From d08c1b3a757e4da5c93908c1b1adbea59a23b9c4 Mon Sep 17 00:00:00 2001 From: Michal Wysoczanski Date: Thu, 30 May 2019 00:10:51 +0200 Subject: [PATCH 2/2] Avoid using 'new' (C++ reserved keyword) as argument name. Signed-off-by: Michal Wysoczanski --- env/posix/ocf_env.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env/posix/ocf_env.h b/env/posix/ocf_env.h index 83d0758..0d49e8b 100644 --- a/env/posix/ocf_env.h +++ b/env/posix/ocf_env.h @@ -473,9 +473,9 @@ static inline long env_atomic64_inc_return(env_atomic64 *a) return __sync_add_and_fetch(&a->counter, 1); } -static inline long env_atomic64_cmpxchg(env_atomic64 *a, long old, long new) +static inline long env_atomic64_cmpxchg(env_atomic64 *a, long old_v, long new_v) { - return __sync_val_compare_and_swap(&a->counter, old, new); + return __sync_val_compare_and_swap(&a->counter, old_v, new_v); } /* *** SPIN LOCKS *** */