Skip to content

Commit 8f86c6b

Browse files
committed
compiler-rt: Fix variadic macro warnings [-Wc++20-extensions]
They began complaining since #84520.
1 parent 213eda1 commit 8f86c6b

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

compiler-rt/lib/asan/asan_interceptors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ INTERCEPTOR(int, pthread_atfork, void (*prepare)(), void (*parent)(),
761761
#endif
762762

763763
#if ASAN_INTERCEPT_VFORK
764-
DEFINE_REAL(int, vfork)
765-
DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork)
764+
DEFINE_REAL(int, vfork,)
765+
DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork,)
766766
#endif
767767

768768
// ---------------------- InitializeAsanInterceptors ---------------- {{{1

compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ INTERCEPTOR_ALIAS(void *, malloc, SIZE_T size);
184184
INTERCEPTOR_ALIAS(void *, memalign, SIZE_T alignment, SIZE_T size);
185185
INTERCEPTOR_ALIAS(void *, pvalloc, SIZE_T size);
186186
INTERCEPTOR_ALIAS(void, cfree, void *ptr);
187-
INTERCEPTOR_ALIAS(__sanitizer_struct_mallinfo, mallinfo);
187+
INTERCEPTOR_ALIAS(__sanitizer_struct_mallinfo, mallinfo,);
188188
INTERCEPTOR_ALIAS(int, mallopt, int cmd, int value);
189189
INTERCEPTOR_ALIAS(void, malloc_stats, void);
190190
# endif

compiler-rt/lib/hwasan/hwasan_interceptors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ INTERCEPTOR(int, pthread_timedjoin_np, void *thread, void **ret,
336336

337337
DEFINE_REAL_PTHREAD_FUNCTIONS
338338

339-
DEFINE_REAL(int, vfork)
340-
DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork)
339+
DEFINE_REAL(int, vfork,)
340+
DECLARE_EXTERN_INTERCEPTOR_AND_WRAPPER(int, vfork,)
341341

342342
// Get and/or change the set of blocked signals.
343343
extern "C" int sigprocmask(int __how, const __hw_sigset_t *__restrict __set,

compiler-rt/lib/msan/msan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static NOINLINE void clear_mallinfo(T *sret) {
255255
#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD
256256
// Interceptors use NRVO and assume that sret will be pre-allocated in
257257
// caller frame.
258-
INTERCEPTOR(__sanitizer_struct_mallinfo, mallinfo) {
258+
INTERCEPTOR(__sanitizer_struct_mallinfo, mallinfo,) {
259259
__sanitizer_struct_mallinfo sret;
260260
clear_mallinfo(&sret);
261261
return sret;

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7650,9 +7650,9 @@ static void write_protoent(void *ctx, struct __sanitizer_protoent *p) {
76507650
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, p->p_aliases, pp_size * sizeof(char *));
76517651
}
76527652

7653-
INTERCEPTOR(struct __sanitizer_protoent *, getprotoent) {
7653+
INTERCEPTOR(struct __sanitizer_protoent *, getprotoent,) {
76547654
void *ctx;
7655-
COMMON_INTERCEPTOR_ENTER(ctx, getprotoent);
7655+
COMMON_INTERCEPTOR_ENTER(ctx, getprotoent,);
76567656
struct __sanitizer_protoent *p = REAL(getprotoent)();
76577657
if (p)
76587658
write_protoent(ctx, p);
@@ -7739,9 +7739,9 @@ INTERCEPTOR(int, getprotobynumber_r, int num,
77397739
#endif
77407740

77417741
#if SANITIZER_INTERCEPT_NETENT
7742-
INTERCEPTOR(struct __sanitizer_netent *, getnetent) {
7742+
INTERCEPTOR(struct __sanitizer_netent *, getnetent,) {
77437743
void *ctx;
7744-
COMMON_INTERCEPTOR_ENTER(ctx, getnetent);
7744+
COMMON_INTERCEPTOR_ENTER(ctx, getnetent,);
77457745
struct __sanitizer_netent *n = REAL(getnetent)();
77467746
if (n) {
77477747
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, n, sizeof(*n));
@@ -9903,9 +9903,9 @@ INTERCEPTOR(char *, fdevname_r, int fd, char *buf, SIZE_T len) {
99039903
#endif
99049904

99059905
#if SANITIZER_INTERCEPT_GETUSERSHELL
9906-
INTERCEPTOR(char *, getusershell) {
9906+
INTERCEPTOR(char *, getusershell,) {
99079907
void *ctx;
9908-
COMMON_INTERCEPTOR_ENTER(ctx, getusershell);
9908+
COMMON_INTERCEPTOR_ENTER(ctx, getusershell,);
99099909
char *res = REAL(getusershell)();
99109910
if (res)
99119911
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, res, internal_strlen(res) + 1);

compiler-rt/lib/sanitizer_common/sanitizer_printf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int AppendNumber(char **buff, const char *buff_end, u64 absolute_value,
5454
uptr num_buffer[kMaxLen];
5555
int pos = 0;
5656
do {
57-
RAW_CHECK_MSG((uptr)pos < kMaxLen, "AppendNumber buffer overflow");
57+
RAW_CHECK_MSG((uptr)pos < kMaxLen, "AppendNumber buffer overflow",);
5858
num_buffer[pos++] = absolute_value % base;
5959
absolute_value /= base;
6060
} while (absolute_value > 0);

0 commit comments

Comments
 (0)