[compiler-rt] 1438544 - [DFSAN] Silence parameter 'va_labels' set but not used warning (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 18:29:38 PDT 2023
Author: Jie Fu
Date: 2023-09-06T09:28:43+08:00
New Revision: 1438544e2364c589efcf6cb15b90486ff0dc3f9d
URL: https://github.com/llvm/llvm-project/commit/1438544e2364c589efcf6cb15b90486ff0dc3f9d
DIFF: https://github.com/llvm/llvm-project/commit/1438544e2364c589efcf6cb15b90486ff0dc3f9d.diff
LOG: [DFSAN] Silence parameter 'va_labels' set but not used warning (NFC)
/data/llvm-project/compiler-rt/lib/dfsan/dfsan_custom.cpp:2546:37: error: parameter 'va_labels' set but not used [-Werror,-Wunused-but-set-parameter]
dfsan_label *va_labels, dfsan_label *ret_label,
^
1 error generated.
Added:
Modified:
compiler-rt/lib/dfsan/dfsan_custom.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/dfsan/dfsan_custom.cpp b/compiler-rt/lib/dfsan/dfsan_custom.cpp
index 7e7af8434b9c95..cffd4bcfd8c192 100644
--- a/compiler-rt/lib/dfsan/dfsan_custom.cpp
+++ b/compiler-rt/lib/dfsan/dfsan_custom.cpp
@@ -2754,6 +2754,7 @@ static int scan_buffer(char *str, size_t size, const char *fmt,
formatter.str_off += retval;
}
+ (void)va_labels; // Silence unused-but-set-parameter warning
*ret_label = 0;
if (ret_origin)
*ret_origin = 0;
More information about the llvm-commits
mailing list