mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-17 19:10:46 +01:00
Minor: make unused attribute a macro
This commit is contained in:
parent
8b79ff432f
commit
5e76a260d2
@ -21,6 +21,8 @@
|
||||
va_end(args); \
|
||||
} while (0)
|
||||
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
typedef int (*SpawnProg)(const void *);
|
||||
|
||||
typedef void (*SigHandler)(int);
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#define VECTOR_TYPE(name, type) \
|
||||
typedef struct { \
|
||||
size_t len, cap, size; \
|
||||
@ -57,7 +59,7 @@
|
||||
#define VECTOR_GEN_SOURCE(name, type) VECTOR_GEN_SOURCE_(name, type, )
|
||||
#define VECTOR_GEN_SOURCE_STATIC(name, type) \
|
||||
VECTOR_TYPE(name, type); \
|
||||
VECTOR_GEN_SOURCE_(name, type, static __attribute__((unused)))
|
||||
VECTOR_GEN_SOURCE_(name, type, static UNUSED)
|
||||
|
||||
#define VECTOR_GEN_HEADER(name, type) \
|
||||
VECTOR_TYPE(name, type); \
|
||||
|
Loading…
Reference in New Issue
Block a user