From 16428a8d91a904c841086a971a8f26c3d8cf1307 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Fri, 12 Feb 2021 11:37:17 +0200 Subject: [PATCH] [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 --- openmp/runtime/src/kmp_environment.cpp | 2 ++ openmp/runtime/src/kmp_io.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/openmp/runtime/src/kmp_environment.cpp b/openmp/runtime/src/kmp_environment.cpp index 19c59be..893b8f5 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 2379162..01bd910 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; -- 2.7.4