Minor: make unused attribute a macro

This commit is contained in:
Nikita Ivanov 2022-07-25 00:01:26 +05:00
parent 8b79ff432f
commit 5e76a260d2
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
2 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,8 @@
va_end(args); \
} while (0)
#define UNUSED __attribute__((unused))
typedef int (*SpawnProg)(const void *);
typedef void (*SigHandler)(int);

View File

@ -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); \