fix: redundant decl of channel_destroy (-Wredundant-decls)
[lttng-ust.git] / libringbuffer / shm.h
index b558464728be52087e13dae3f931ccf2d2c308e2..4889d6d62a0b9adb6cc453ec65851dde8369a398 100644 (file)
@@ -30,11 +30,6 @@ int channel_handle_add_stream(struct lttng_ust_shm_handle *handle,
 __attribute__((visibility("hidden")))
 unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle);
 
-__attribute__((visibility("hidden")))
-extern
-void channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
-               int consumer);
-
 /*
  * Pointer dereferencing. We don't trust the shm_ref, so we validate
  * both the index and offset with known boundaries.
@@ -63,12 +58,8 @@ char *_shmp_offset(struct shm_object_table *table, struct shm_ref *ref,
        return &obj->memory_map[ref_offset];
 }
 
-#define shmp_index(handle, ref, index)                                 \
-       ({                                                              \
-               __typeof__((ref)._type) ____ptr_ret;                    \
-               ____ptr_ret = (__typeof__(____ptr_ret)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*____ptr_ret));        \
-               ____ptr_ret;                                            \
-       })
+#define shmp_index(handle, ref, index) \
+       ((__typeof__((ref)._type)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*((ref)._type))))
 
 #define shmp(handle, ref)      shmp_index(handle, ref, 0)
 
This page took 0.023175 seconds and 4 git commands to generate.