diff --git a/spa/include/spa/debug/format.h b/spa/include/spa/debug/format.h index 5fe0eac3e..856e9954c 100644 --- a/spa/include/spa/debug/format.h +++ b/spa/include/spa/debug/format.h @@ -5,6 +5,8 @@ #ifndef SPA_DEBUG_FORMAT_H #define SPA_DEBUG_FORMAT_H +#include + #include #include #include @@ -41,10 +43,11 @@ spa_debug_strbuf_format_value(struct spa_strbuf *buffer, const struct spa_type_i break; case SPA_TYPE_Id: { - const char *str = spa_debug_type_find_short_name(info, *(int32_t *) body); + uint32_t value = *(uint32_t *) body; + const char *str = spa_debug_type_find_short_name(info, value); char tmp[64]; if (str == NULL) { - snprintf(tmp, sizeof(tmp), "%d", *(int32_t*)body); + snprintf(tmp, sizeof(tmp), "%" PRIu32, value); str = tmp; } spa_strbuf_append(buffer, "%s", str); diff --git a/spa/include/spa/debug/pod.h b/spa/include/spa/debug/pod.h index 21771691a..4ff3f3e01 100644 --- a/spa/include/spa/debug/pod.h +++ b/spa/include/spa/debug/pod.h @@ -39,8 +39,8 @@ spa_debugc_pod_value(struct spa_debug_context *ctx, int indent, const struct spa spa_debugc(ctx, "%*s" "Bool %s", indent, "", (*(int32_t *) body) ? "true" : "false"); break; case SPA_TYPE_Id: - spa_debugc(ctx, "%*s" "Id %-8" PRId32 " (%s)", indent, "", *(int32_t *) body, - spa_debug_type_find_name(info, *(int32_t *) body)); + spa_debugc(ctx, "%*s" "Id %-8" PRIu32 " (%s)", indent, "", *(uint32_t *) body, + spa_debug_type_find_name(info, *(uint32_t *) body)); break; case SPA_TYPE_Int: spa_debugc(ctx, "%*s" "Int %" PRId32, indent, "", *(int32_t *) body);