Skip to content

Commit 16428a8

Browse files
committed
[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
1 parent b388c84 commit 16428a8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

openmp/runtime/src/kmp_environment.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ static void ___kmp_env_blk_parse_windows(
376376
{ "HOME=/home/lev", "TERM=xterm", NULL }
377377
*/
378378

379+
#if KMP_OS_UNIX
379380
static void
380381
___kmp_env_blk_parse_unix(kmp_env_blk_t *block, // M: Env block to fill.
381382
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.
423424
block->vars = vars;
424425
block->count = count;
425426
}
427+
#endif
426428

427429
void __kmp_env_blk_init(kmp_env_blk_t *block, // M: Block to initialize.
428430
char const *bulk // I: Initialization string, or NULL.

openmp/runtime/src/kmp_io.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ void __kmp_close_console(void) {
8484
static void __kmp_redirect_output(void) {
8585
__kmp_acquire_bootstrap_lock(&__kmp_console_lock);
8686

87+
(void)is_console;
8788
if (!__kmp_console_exists) {
8889
HANDLE ho;
8990
HANDLE he;

0 commit comments

Comments
 (0)