Rename __unused to UV__UNUSED.
__unused is - contrary to its name - used in glibc. The ANSI/ISO standards reserve all identifiers starting with two underscores so it's generally a good idea not to use those.
This commit is contained in:
parent
8895c9e672
commit
effa3b65b1
@ -26,11 +26,11 @@
|
|||||||
#ifndef UV_TREE_H_
|
#ifndef UV_TREE_H_
|
||||||
#define UV_TREE_H_
|
#define UV_TREE_H_
|
||||||
|
|
||||||
#ifndef __unused
|
#ifndef UV__UNUSED
|
||||||
# if __GNUC__
|
# if __GNUC__
|
||||||
# define __unused __attribute__((unused))
|
# define UV__UNUSED __attribute__((unused))
|
||||||
# else
|
# else
|
||||||
# define __unused
|
# define UV__UNUSED
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -383,7 +383,7 @@ struct { \
|
|||||||
#define RB_PROTOTYPE(name, type, field, cmp) \
|
#define RB_PROTOTYPE(name, type, field, cmp) \
|
||||||
RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
|
RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
|
||||||
#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
|
#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
|
||||||
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
|
RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
|
||||||
#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
|
#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
|
||||||
attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
|
attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \
|
||||||
attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
|
attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
|
||||||
@ -402,7 +402,7 @@ attr struct type *name##_RB_MINMAX(struct name *, int); \
|
|||||||
#define RB_GENERATE(name, type, field, cmp) \
|
#define RB_GENERATE(name, type, field, cmp) \
|
||||||
RB_GENERATE_INTERNAL(name, type, field, cmp,)
|
RB_GENERATE_INTERNAL(name, type, field, cmp,)
|
||||||
#define RB_GENERATE_STATIC(name, type, field, cmp) \
|
#define RB_GENERATE_STATIC(name, type, field, cmp) \
|
||||||
RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
|
RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static)
|
||||||
#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
|
#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
|
||||||
attr void \
|
attr void \
|
||||||
name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
|
name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user