[Openmp-commits] [openmp] 16428a8 - [OpenMP] Avoid warnings about unused static functions on windows
Martin Storsjö via Openmp-commits
openmp-commits at lists.llvm.org
Fri Feb 12 11:56:20 PST 2021
Author: Martin Storsjö
Date: 2021-02-12T21:55:31+02:00
New Revision: 16428a8d91a904c841086a971a8f26c3d8cf1307
URL: https://github.com/llvm/llvm-project/commit/16428a8d91a904c841086a971a8f26c3d8cf1307
DIFF: https://github.com/llvm/llvm-project/commit/16428a8d91a904c841086a971a8f26c3d8cf1307.diff
LOG: [OpenMP] Avoid warnings about unused static functions on windows
Add ifdefs around one function that only is used in unix build
configurations.
Add a void cast for a windows specific function that currently is
unused but may be intended to be used at some point.
Differential Revision: https://reviews.llvm.org/D96584
Added:
Modified:
openmp/runtime/src/kmp_environment.cpp
openmp/runtime/src/kmp_io.cpp
Removed:
################################################################################
diff --git a/openmp/runtime/src/kmp_environment.cpp b/openmp/runtime/src/kmp_environment.cpp
index 19c59be6cf23..893b8f524850 100644
--- a/openmp/runtime/src/kmp_environment.cpp
+++ b/openmp/runtime/src/kmp_environment.cpp
@@ -376,6 +376,7 @@ static void ___kmp_env_blk_parse_windows(
{ "HOME=/home/lev", "TERM=xterm", NULL }
*/
+#if KMP_OS_UNIX
static void
___kmp_env_blk_parse_unix(kmp_env_blk_t *block, // M: Env block to fill.
char **env // I: Unix environment to parse.
@@ -423,6 +424,7 @@ ___kmp_env_blk_parse_unix(kmp_env_blk_t *block, // M: Env block to fill.
block->vars = vars;
block->count = count;
}
+#endif
void __kmp_env_blk_init(kmp_env_blk_t *block, // M: Block to initialize.
char const *bulk // I: Initialization string, or NULL.
diff --git a/openmp/runtime/src/kmp_io.cpp b/openmp/runtime/src/kmp_io.cpp
index 2379162c209c..01bd910de38f 100644
--- a/openmp/runtime/src/kmp_io.cpp
+++ b/openmp/runtime/src/kmp_io.cpp
@@ -84,6 +84,7 @@ void __kmp_close_console(void) {
static void __kmp_redirect_output(void) {
__kmp_acquire_bootstrap_lock(&__kmp_console_lock);
+ (void)is_console;
if (!__kmp_console_exists) {
HANDLE ho;
HANDLE he;
More information about the Openmp-commits
mailing list