[Openmp-commits] [openmp] [OpenMP] Update ompdModule.c printf to match argument type (PR #152785)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 8 14:27:10 PDT 2025


https://github.com/jprotze updated https://github.com/llvm/llvm-project/pull/152785

>From 3bfff7d16ab5e171bb30dfbbae4d55e00819e3fb Mon Sep 17 00:00:00 2001
From: CatherineMoore <catmoore at amd.com>
Date: Fri, 8 Aug 2025 16:00:03 -0400
Subject: [PATCH 1/4] Update ompdModule.c

Update printf format string to match argument list
---
 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..8bc22a98f9a9d 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -1180,7 +1180,7 @@ static PyObject *call_ompd_get_icv_from_scope(PyObject *self, PyObject *args) {
 
   if (retVal != ompd_rc_ok) {
     if (retVal != ompd_rc_incomplete) {
-      _printf("An error occurred when calling ompd_get_icv_from_scope(%i, %i): "
+      _printf("An error occurred when calling ompd_get_icv_from_scope(%i, %ul): "
               "Error code: %d",
               scope, icvId, retVal);
     }

>From 9859964ba3110fbb001b6a057d6a426a52c447c1 Mon Sep 17 00:00:00 2001
From: CatherineMoore <catmoore at amd.com>
Date: Fri, 8 Aug 2025 16:41:11 -0400
Subject: [PATCH 2/4] Update openmp/libompd/gdb-plugin/ompdModule.c

Co-authored-by: Joachim <protze at rz.rwth-aachen.de>
---
 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 8bc22a98f9a9d..c589244defb6c 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -1180,7 +1180,7 @@ static PyObject *call_ompd_get_icv_from_scope(PyObject *self, PyObject *args) {
 
   if (retVal != ompd_rc_ok) {
     if (retVal != ompd_rc_incomplete) {
-      _printf("An error occurred when calling ompd_get_icv_from_scope(%i, %ul): "
+      _printf("An error occurred when calling ompd_get_icv_from_scope(%i, %" PRIu64 "): "
               "Error code: %d",
               scope, icvId, retVal);
     }

>From 5cae53c7daa51c88ec282b43b3861fb6cce2b206 Mon Sep 17 00:00:00 2001
From: Joachim <protze at rz.rwth-aachen.de>
Date: Fri, 8 Aug 2025 22:48:07 +0200
Subject: [PATCH 3/4] clangformat

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

diff --git a/openmp/libompd/gdb-plugin/ompdModule.c b/openmp/libompd/gdb-plugin/ompdModule.c
index c589244defb6c..82697461c4175 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -1180,9 +1180,9 @@ static PyObject *call_ompd_get_icv_from_scope(PyObject *self, PyObject *args) {
 
   if (retVal != ompd_rc_ok) {
     if (retVal != ompd_rc_incomplete) {
-      _printf("An error occurred when calling ompd_get_icv_from_scope(%i, %" PRIu64 "): "
-              "Error code: %d",
-              scope, icvId, retVal);
+      _printf(
+              "An error occurred when calling ompd_get_icv_from_scope(%i, %" PRIu64 
+              "): Error code: %d", scope, icvId, retVal);
     }
     return Py_None;
   }

>From b1ab51a9f4d958b977d448be6f139bfdb6a547ed Mon Sep 17 00:00:00 2001
From: Joachim <protze at rz.rwth-aachen.de>
Date: Fri, 8 Aug 2025 23:27:01 +0200
Subject: [PATCH 4/4] clang-format

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

diff --git a/openmp/libompd/gdb-plugin/ompdModule.c b/openmp/libompd/gdb-plugin/ompdModule.c
index 82697461c4175..533cba75dded3 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -1181,8 +1181,9 @@ static PyObject *call_ompd_get_icv_from_scope(PyObject *self, PyObject *args) {
   if (retVal != ompd_rc_ok) {
     if (retVal != ompd_rc_incomplete) {
       _printf(
-              "An error occurred when calling ompd_get_icv_from_scope(%i, %" PRIu64 
-              "): Error code: %d", scope, icvId, retVal);
+          "An error occurred when calling ompd_get_icv_from_scope(%i, %" PRIu64 
+          "): Error code: %d", 
+          scope, icvId, retVal);
     }
     return Py_None;
   }



More information about the Openmp-commits mailing list