.gitignore: add some more IDE / tools related file
[babeltrace.git] / src / compat / bitfield.h
index e0a3885cb28d36996558529dfc76e88b63785a9e..022cb4cf1c2427c3e40fa8fe82238eb4365ba522 100644 (file)
@@ -4,8 +4,8 @@
  * Copyright 2010-2019 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#ifndef _BABELTRACE_BITFIELD_H
-#define _BABELTRACE_BITFIELD_H
+#ifndef BABELTRACE_COMPAT_BITFIELD_H
+#define BABELTRACE_COMPAT_BITFIELD_H
 
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <stdbool.h>   /* C99 7.16 bool type */
@@ -189,7 +189,7 @@ do {                                                                        \
 #define _bt_bitfield_write_le(ptr, type, start, length, v)             \
 do {                                                                   \
        __typeof__(v) _v = (v);                                 \
-       type *_ptr = (void *) (ptr);                                    \
+       type *_ptr = (type *) (ptr);                                    \
        unsigned long _start = (start), _length = (length);             \
        type _mask, _cmask;                                             \
        unsigned long _ts = sizeof(type) * CHAR_BIT; /* type size */    \
@@ -248,7 +248,7 @@ do {                                                                        \
 #define _bt_bitfield_write_be(ptr, type, start, length, v)             \
 do {                                                                   \
        __typeof__(v) _v = (v);                                         \
-       type *_ptr = (void *) (ptr);                                    \
+       type *_ptr = (type *) (ptr);                                    \
        unsigned long _start = (start), _length = (length);             \
        type _mask, _cmask;                                             \
        unsigned long _ts = sizeof(type) * CHAR_BIT; /* type size */    \
@@ -409,7 +409,7 @@ do {                                                                        \
 do {                                                                   \
        __typeof__(*(vptr)) *_vptr = (vptr);                            \
        __typeof__(*_vptr) _v;                                          \
-       type *_ptr = (void *) (ptr);                                    \
+       type *_ptr = (type *) (ptr);                                    \
        unsigned long _start = (start), _length = (length);             \
        type _mask, _cmask;                                             \
        unsigned long _ts = sizeof(type) * CHAR_BIT; /* type size */    \
@@ -506,4 +506,4 @@ do {                                                                        \
 
 #endif
 
-#endif /* _BABELTRACE_BITFIELD_H */
+#endif /* BABELTRACE_COMPAT_BITFIELD_H */
This page took 0.024732 seconds and 4 git commands to generate.