Skip to content

Commit ec3ee5e

Browse files
authored
Avoid using user identifiers in function declarations. (#124)
MultiSource/Benchmarks/McCat in llvm-test-suite has a macro named `n`, so rename function parameters to avoid colliding.
1 parent 8048aeb commit ec3ee5e

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

basics/include/__functions_malloc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
extern "C" {
1111
#endif
1212

13-
void *malloc(size_t size) __attribute__((__malloc__, __warn_unused_result__));
14-
void free(void *ptr);
15-
void *calloc(size_t nmemb, size_t size) __attribute__((__malloc__, __warn_unused_result__));
16-
void *realloc(void *ptr, size_t size) __attribute__((__warn_unused_result__));
13+
void *malloc(size_t __size) __attribute__((__malloc__, __warn_unused_result__));
14+
void free(void *__ptr);
15+
void *calloc(size_t __nmemb, size_t __size) __attribute__((__malloc__, __warn_unused_result__));
16+
void *realloc(void *__ptr, size_t __size) __attribute__((__warn_unused_result__));
1717

1818
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
19-
void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__));
19+
void *reallocarray(void *__ptr, size_t __nmemb, size_t __size) __attribute__((__warn_unused_result__));
2020
#endif
2121

2222
#ifdef __cplusplus

basics/include/__functions_memcpy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
extern "C" {
1010
#endif
1111

12-
void *memcpy(void *__restrict__ dst, const void *__restrict__ src, size_t n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
13-
void *memmove(void *dst, const void *src, size_t n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
14-
void *memset(void *dst, int c, size_t n) __attribute__((__nothrow__, __leaf__, __nonnull__(1)));
12+
void *memcpy(void *__restrict__ __dst, const void *__restrict__ __src, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
13+
void *memmove(void *__dst, const void *__src, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1, 2)));
14+
void *memset(void *__dst, int __c, size_t __n) __attribute__((__nothrow__, __leaf__, __nonnull__(1)));
1515

1616
#ifdef __cplusplus
1717
}

0 commit comments

Comments
 (0)