[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 13:41:18 PDT 2025


https://github.com/CatherineMoore 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/2] 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/2] 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);
     }



More information about the Openmp-commits mailing list