[Openmp-commits] [openmp] b0fc18d - [ompd] Fix gdb-plugin warnings after D100185
Fangrui Song via Openmp-commits
openmp-commits at lists.llvm.org
Mon Oct 24 22:28:33 PDT 2022
Author: Fangrui Song
Date: 2022-10-24T22:28:27-07:00
New Revision: b0fc18da5bd9f6c6da5f8af775f75a7af9c27af1
URL: https://github.com/llvm/llvm-project/commit/b0fc18da5bd9f6c6da5f8af775f75a7af9c27af1
DIFF: https://github.com/llvm/llvm-project/commit/b0fc18da5bd9f6c6da5f8af775f75a7af9c27af1.diff
LOG: [ompd] Fix gdb-plugin warnings after D100185
Added:
Modified:
openmp/libompd/gdb-plugin/ompdModule.c
Removed:
################################################################################
diff --git a/openmp/libompd/gdb-plugin/ompdModule.c b/openmp/libompd/gdb-plugin/ompdModule.c
index 7e61e68d5600e..df602c54aba37 100644
--- a/openmp/libompd/gdb-plugin/ompdModule.c
+++ b/openmp/libompd/gdb-plugin/ompdModule.c
@@ -515,7 +515,7 @@ ompd_rc_t _print(const char *str, int category) {
return ompd_rc_ok;
}
-void _printf(char *format, ...) {
+void _printf(const char *format, ...) {
va_list args;
va_start(args, format);
char output[1024];
@@ -783,11 +783,11 @@ _thread_context(ompd_address_space_context_t *context, /* IN */
return ompd_rc_unsupported;
long int tid;
if (sizeof(long int) >= 8 && sizeof_thread_id == 8)
- tid = *(uint64_t *)thread_id;
+ tid = *(const uint64_t *)thread_id;
else if (sizeof(long int) >= 4 && sizeof_thread_id == 4)
- tid = *(uint32_t *)thread_id;
+ tid = *(const uint32_t *)thread_id;
else if (sizeof(long int) >= 2 && sizeof_thread_id == 2)
- tid = *(uint16_t *)thread_id;
+ tid = *(const uint16_t *)thread_id;
else
return ompd_rc_bad_input;
PyObject *pFunc = PyObject_GetAttrString(pModule, "_thread_context");
More information about the Openmp-commits
mailing list