[compiler-rt] 40ef3e6 - Add some prototypes to these functions; NFC
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 9 07:53:58 PDT 2022
Author: Aaron Ballman
Date: 2022-04-09T10:53:48-04:00
New Revision: 40ef3e6df66411cfb26d8a5d6c19ea3de55949c2
URL: https://github.com/llvm/llvm-project/commit/40ef3e6df66411cfb26d8a5d6c19ea3de55949c2
DIFF: https://github.com/llvm/llvm-project/commit/40ef3e6df66411cfb26d8a5d6c19ea3de55949c2.diff
LOG: Add some prototypes to these functions; NFC
This is expected to fix the issues in this build bot:
https://lab.llvm.org/buildbot/#/builders/37/builds/12312
Added:
Modified:
compiler-rt/lib/builtins/cpu_model.c
compiler-rt/lib/builtins/emutls.c
compiler-rt/lib/builtins/fp_mode.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c
index 7651e84f876c0..e52f2aa610a67 100644
--- a/compiler-rt/lib/builtins/cpu_model.c
+++ b/compiler-rt/lib/builtins/cpu_model.c
@@ -149,7 +149,7 @@ enum ProcessorFeatures {
// Check motivated by bug reports for OpenSSL crashing on CPUs without CPUID
// support. Consequently, for i386, the presence of CPUID is checked first
// via the corresponding eflags bit.
-static bool isCpuIdSupported() {
+static bool isCpuIdSupported(void) {
#if defined(__GNUC__) || defined(__clang__)
#if defined(__i386__)
int __cpuid_supported;
diff --git a/compiler-rt/lib/builtins/emutls.c b/compiler-rt/lib/builtins/emutls.c
index 3a2908a42484c..390ffb25f6cf0 100644
--- a/compiler-rt/lib/builtins/emutls.c
+++ b/compiler-rt/lib/builtins/emutls.c
@@ -93,7 +93,7 @@ static __inline void emutls_setspecific(emutls_address_array *value) {
pthread_setspecific(emutls_pthread_key, (void *)value);
}
-static __inline emutls_address_array *emutls_getspecific() {
+static __inline emutls_address_array *emutls_getspecific(void) {
return (emutls_address_array *)pthread_getspecific(emutls_pthread_key);
}
@@ -125,9 +125,9 @@ static __inline void emutls_init_once(void) {
pthread_once(&once, emutls_init);
}
-static __inline void emutls_lock() { pthread_mutex_lock(&emutls_mutex); }
+static __inline void emutls_lock(void) { pthread_mutex_lock(&emutls_mutex); }
-static __inline void emutls_unlock() { pthread_mutex_unlock(&emutls_mutex); }
+static __inline void emutls_unlock(void) { pthread_mutex_unlock(&emutls_mutex); }
#else // _WIN32
@@ -209,16 +209,16 @@ static __inline void emutls_init_once(void) {
InitOnceExecuteOnce(&once, emutls_init, NULL, NULL);
}
-static __inline void emutls_lock() { EnterCriticalSection(emutls_mutex); }
+static __inline void emutls_lock(void) { EnterCriticalSection(emutls_mutex); }
-static __inline void emutls_unlock() { LeaveCriticalSection(emutls_mutex); }
+static __inline void emutls_unlock(void) { LeaveCriticalSection(emutls_mutex); }
static __inline void emutls_setspecific(emutls_address_array *value) {
if (TlsSetValue(emutls_tls_index, (LPVOID)value) == 0)
win_abort(GetLastError(), "TlsSetValue");
}
-static __inline emutls_address_array *emutls_getspecific() {
+static __inline emutls_address_array *emutls_getspecific(void) {
LPVOID value = TlsGetValue(emutls_tls_index);
if (value == NULL) {
const DWORD err = GetLastError();
diff --git a/compiler-rt/lib/builtins/fp_mode.c b/compiler-rt/lib/builtins/fp_mode.c
index b84df8abb27d4..51865473cda7e 100644
--- a/compiler-rt/lib/builtins/fp_mode.c
+++ b/compiler-rt/lib/builtins/fp_mode.c
@@ -15,8 +15,8 @@
#include "fp_mode.h"
// IEEE-754 default rounding (to nearest, ties to even).
-CRT_FE_ROUND_MODE __fe_getround() { return CRT_FE_TONEAREST; }
+CRT_FE_ROUND_MODE __fe_getround(void) { return CRT_FE_TONEAREST; }
-int __fe_raise_inexact() {
+int __fe_raise_inexact(void) {
return 0;
}
More information about the llvm-commits
mailing list