Skip to content

Commit

Permalink
Merge pull request #72 from lanl/jmm/format-warning-from-clang
Browse files Browse the repository at this point in the history
make clang happy
  • Loading branch information
Yurlungur authored Nov 29, 2024
2 parents 8fe3423 + f6e04e5 commit 4c4cbab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ports-of-call/portability.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ template <typename... Ts>
PORTABLE_INLINE_FUNCTION void printf(char const *const format, Ts... ts) {
// disable for hip
#ifndef __HIPCC__
std::printf(format, ts...);
if constexpr (sizeof...(Ts) > 0) {
std::printf(format, ts...);
} else {
std::printf("%s", format);
}
#endif // __HIPCC__
return;
}
Expand Down

0 comments on commit 4c4cbab

Please sign in to comment.