Skip to content

Commit e60a573

Browse files
authored
[Offload] Print Image location rather than casting it (#160309)
This squishes a warning where the runtime tries to bind a StringRef to a `%p`.
1 parent c2e8407 commit e60a573

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

offload/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,8 @@ int32_t GenericPluginTy::is_initialized() const { return Initialized; }
17141714
int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
17151715
auto HandleError = [&](Error Err) -> bool {
17161716
[[maybe_unused]] std::string ErrStr = toString(std::move(Err));
1717-
DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
1717+
DP("Failure to check validity of image %p: %s", Image.data(),
1718+
ErrStr.c_str());
17181719
return false;
17191720
};
17201721
switch (identify_magic(Image)) {
@@ -1742,7 +1743,8 @@ int32_t GenericPluginTy::isPluginCompatible(StringRef Image) {
17421743
int32_t GenericPluginTy::isDeviceCompatible(int32_t DeviceId, StringRef Image) {
17431744
auto HandleError = [&](Error Err) -> bool {
17441745
[[maybe_unused]] std::string ErrStr = toString(std::move(Err));
1745-
DP("Failure to check validity of image %p: %s", Image, ErrStr.c_str());
1746+
DP("Failure to check validity of image %p: %s", Image.data(),
1747+
ErrStr.c_str());
17461748
return false;
17471749
};
17481750
switch (identify_magic(Image)) {

0 commit comments

Comments
 (0)