[ompd] Fix gdb-plugin warnings after D100185

This commit is contained in:
Fangrui Song 2022-10-24 22:28:27 -07:00
parent a54f3347e8
commit b0fc18da5b
1 changed files with 4 additions and 4 deletions

View File

@ -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");