Skip to content

Conversation

RossBrunton
Copy link
Contributor

This squishes a warning where the runtime tries to bind a StringRef to
a %p.

This squishes a warning where the runtime tries to bind a StringRef to
a `%p`.
@llvmbot
Copy link
Member

llvmbot commented Sep 23, 2025

@llvm/pr-subscribers-offload

Author: Ross Brunton (RossBrunton)

Changes

This squishes a warning where the runtime tries to bind a StringRef to
a %p.


Full diff: https://github.com/llvm/llvm-project/pull/160309.diff

1 Files Affected:

  • (modified) offload/plugins-nextgen/common/src/PluginInterface.cpp (+2-2)
diff --git a/offload/plugins-nextgen/common/src/PluginInterface.cpp b/offload/plugins-nextgen/common/src/PluginInterface.cpp
index 30b5db782370d..53449d3fda992 100644
--- a/offload/plugins-nextgen/common/src/PluginInterface.cpp
+++ b/offload/plugins-nextgen/common/src/PluginInterface.cpp
@@ -1714,7 +1714,7 @@ int32_t GenericPluginTy::is_initialized() const { return Initialized; }
 int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
   auto HandleError = [&](Error Err) -> bool {
     [[maybe_unused]] std::string ErrStr = toString(std::move(Err));
-    DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
+    DP("Failure to check validity of image %p: %s", Image.data(), ErrStr.c_str());
     return false;
   };
   switch (identify_magic(Image)) {
@@ -1742,7 +1742,7 @@ int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
 int32_t GenericPluginTy::isDeviceCompatible(int32_t DeviceId, StringRef Image) {
   auto HandleError = [&](Error Err) -> bool {
     [[maybe_unused]] std::string ErrStr = toString(std::move(Err));
-    DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
+    DP("Failure to check validity of image %p: %s", Image.data(), ErrStr.c_str());
     return false;
   };
   switch (identify_magic(Image)) {

Copy link

github-actions bot commented Sep 23, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@RossBrunton RossBrunton merged commit e60a573 into llvm:main Sep 24, 2025
9 checks passed
searlmc1 pushed a commit to ROCm/llvm-project that referenced this pull request Oct 5, 2025
This squishes a warning where the runtime tries to bind a StringRef to
a `%p`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants