[Openmp-commits] [PATCH] D41504: Remove unused positional argument for printf
Phabricator via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Dec 22 08:41:22 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321361: Remove unused positional argument for printf (authored by jprotze, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D41504?vs=127912&id=128029#toc
Repository:
rL LLVM
https://reviews.llvm.org/D41504
Files:
openmp/trunk/runtime/src/i18n/en_US.txt
openmp/trunk/runtime/src/kmp_i18n.cpp
Index: openmp/trunk/runtime/src/i18n/en_US.txt
===================================================================
--- openmp/trunk/runtime/src/i18n/en_US.txt
+++ openmp/trunk/runtime/src/i18n/en_US.txt
@@ -115,7 +115,7 @@
Warning "OMP: Warning #%1$d: %2$s\n"
Fatal "OMP: Error #%1$d: %2$s\n"
SysErr "OMP: System error #%1$d: %2$s\n"
-Hint "OMP: Hint: %2$s\n"
+Hint "OMP: Hint %1$s\n"
Pragma "%1$s pragma (at %2$s:%3$s():%4$s)"
# %1 is pragma name (like "parallel" or "master",
Index: openmp/trunk/runtime/src/kmp_i18n.cpp
===================================================================
--- openmp/trunk/runtime/src/kmp_i18n.cpp
+++ openmp/trunk/runtime/src/kmp_i18n.cpp
@@ -823,13 +823,15 @@
switch (message.type) {
case kmp_mt_hint: {
format = kmp_i18n_fmt_Hint;
+ // we cannot skip %1$ and only use %2$ to print the message without the number
+ fmsg = __kmp_msg_format(format, message.str);
} break;
case kmp_mt_syserr: {
format = kmp_i18n_fmt_SysErr;
+ fmsg = __kmp_msg_format(format, message.num, message.str);
} break;
default: { KMP_DEBUG_ASSERT(0); }
}
- fmsg = __kmp_msg_format(format, message.num, message.str);
__kmp_str_free(&message.str);
__kmp_str_buf_cat(&buffer, fmsg.str, fmsg.len);
__kmp_str_free(&fmsg.str);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41504.128029.patch
Type: text/x-patch
Size: 1460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20171222/ae3343a8/attachment.bin>
More information about the Openmp-commits
mailing list