[Openmp-commits] [openmp] [OpenMP] Update printf statement with missing argument. (PR #153704)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 15 09:31:24 PDT 2025


https://github.com/CatherineMoore updated https://github.com/llvm/llvm-project/pull/153704

>From 82452dd64ba6f7d4396b8a2f3fdefbe6aaac32bc Mon Sep 17 00:00:00 2001
From: Catherine Moore <catherine.moore at amd.com>
Date: Thu, 14 Aug 2025 17:26:13 -0500
Subject: [PATCH 1/2] Update printf statement with missing argument.

---
 openmp/libompd/gdb-plugin/ompdModule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openmp/libompd/gdb-plugin/ompdModule.c b/openmp/libompd/gdb-plugin/ompdModule.c
index df602c54aba37..fb237b1f17fc5 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -967,7 +967,7 @@ static PyObject *call_ompd_get_task_parallel_handle(PyObject *self,
 
   if (retVal != ompd_rc_ok) {
     _printf("An error occurred when calling ompd_get_task_parallel_handle! "
-            "Error code: %d");
+            "Error code: %d", retVal);
     return Py_BuildValue("l", retVal);
   }
   return PyCapsule_New(taskParallelHandle, "ParallelHandle",

>From 937b56b8f10ab6efd848668071a9183644ccaaa9 Mon Sep 17 00:00:00 2001
From: CatherineMoore <catmoore at amd.com>
Date: Fri, 15 Aug 2025 12:31:15 -0400
Subject: [PATCH 2/2] Fix formatting.

---
 openmp/libompd/gdb-plugin/ompdModule.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openmp/libompd/gdb-plugin/ompdModule.c b/openmp/libompd/gdb-plugin/ompdModule.c
index fb237b1f17fc5..6edc1cdc9c60b 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -943,7 +943,8 @@ static PyObject *call_ompd_get_enclosing_parallel_handle(PyObject *self,
 
   if (retVal != ompd_rc_ok) {
     _printf("An error occurred when calling "
-            "ompd_get_enclosing_parallel_handle! Error code: %d",
+            "ompd_get_enclosing_parallel_handle!"
+            "Error code: %d",
             retVal);
     return Py_BuildValue("l", retVal);
   }



More information about the Openmp-commits mailing list