[compiler-rt] f9ac557 - [NFC] Properly suppress unused argument warning in __isOSVersionAtLeast()
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 19:42:16 PDT 2022
Author: Arthur Eubanks
Date: 2022-06-06T19:41:26-07:00
New Revision: f9ac5575675e4117c2e097a71ad0f02cab92aa97
URL: https://github.com/llvm/llvm-project/commit/f9ac5575675e4117c2e097a71ad0f02cab92aa97
DIFF: https://github.com/llvm/llvm-project/commit/f9ac5575675e4117c2e097a71ad0f02cab92aa97.diff
LOG: [NFC] Properly suppress unused argument warning in __isOSVersionAtLeast()
Casting to non-void causes
expression result unused [-Wunused-value]
Added:
Modified:
compiler-rt/lib/builtins/os_version_check.c
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/os_version_check.c b/compiler-rt/lib/builtins/os_version_check.c
index d7194b99ae54c..ebfb2dfc72ddd 100644
--- a/compiler-rt/lib/builtins/os_version_check.c
+++ b/compiler-rt/lib/builtins/os_version_check.c
@@ -307,8 +307,8 @@ static void readSystemProperties(void) {
}
int32_t __isOSVersionAtLeast(int32_t Major, int32_t Minor, int32_t Subminor) {
- (int32_t) Minor;
- (int32_t) Subminor;
+ (void) Minor;
+ (void) Subminor;
static pthread_once_t once = PTHREAD_ONCE_INIT;
pthread_once(&once, readSystemProperties);
More information about the llvm-commits
mailing list