[all-commits] [llvm/llvm-project] 048423: [OpenMP] Fix build warnings

Shao-Ce SUN via All-commits all-commits at lists.llvm.org
Sun Jul 9 07:12:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 048423702d4b0f2c61d7d98c84ab5e7edc05f4ec
      https://github.com/llvm/llvm-project/commit/048423702d4b0f2c61d7d98c84ab5e7edc05f4ec
  Author: Shao-Ce SUN <sunshaoce at iscas.ac.cn>
  Date:   2023-07-09 (Sun, 09 Jul 2023)

  Changed paths:
    M openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
    M openmp/libomptarget/src/private.h

  Log Message:
  -----------
  [OpenMP] Fix build warnings

```
llvm-project/openmp/libomptarget/src/private.h:260:9: warning: 'DEBUG_PREFIX' macro redefined [-Wmacro-redefined]
#define DEBUG_PREFIX GETNAME(TARGET_NAME)
        ^
llvm-project/openmp/libomptarget/include/ompt_device_callbacks.h:22:9: note: previous definition is here
#define DEBUG_PREFIX "OMPT"
        ^
1 warning generated.
```

```
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:458:14: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
      return std::move(Err);
             ^
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:458:14: note: remove std::move call here
      return std::move(Err);
             ^~~~~~~~~~   ~
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:552:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
    return std::move(Err);
           ^
llvm-project/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp:552:12: note: remove std::move call here
    return std::move(Err);
           ^~~~~~~~~~   ~
2 warnings generated.
```

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D154787




More information about the All-commits mailing list