[Openmp-commits] [PATCH] D96584: [OpenMP] Avoid warnings about unused static functions on windows

Martin Storsjö via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Feb 12 01:53:55 PST 2021

mstorsjo created this revision.
mstorsjo added reviewers: hbae, AndreyChurbanov.
Herald added subscribers: guansong, yaxunl.
mstorsjo requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

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.

  rG LLVM Github Monorepo



Index: openmp/runtime/src/kmp_io.cpp
--- openmp/runtime/src/kmp_io.cpp
+++ openmp/runtime/src/kmp_io.cpp
@@ -84,6 +84,7 @@
 static void __kmp_redirect_output(void) {
+  (void)is_console;
   if (!__kmp_console_exists) {
     HANDLE ho;
     HANDLE he;
Index: openmp/runtime/src/kmp_environment.cpp
--- openmp/runtime/src/kmp_environment.cpp
+++ openmp/runtime/src/kmp_environment.cpp
@@ -376,6 +376,7 @@
         { "HOME=/home/lev", "TERM=xterm", NULL }
 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 @@
   block->vars = vars;
   block->count = count;
 void __kmp_env_blk_init(kmp_env_blk_t *block, // M: Block to initialize.
                         char const *bulk // I: Initialization string, or NULL.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96584.323257.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210212/dbc553c6/attachment.bin>

More information about the Openmp-commits mailing list