mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-01 11:26:37 +02:00
systemtap: Use correct formatters/types
Try to avoid casting variables to potentially smaller types to fit defined probes. This can truncate values and lead to wrong results. Also make sure that signedness matches. Since GType can be even 128 bit on CHERI architecture, cast all these various types used based on platform to uintmax_t which SystemTap properly processes.
This commit is contained in:
@@ -481,7 +481,7 @@ type_node_any_new_W (TypeNode *pnode,
|
||||
pnode->children[i] = type;
|
||||
}
|
||||
|
||||
TRACE(GOBJECT_TYPE_NEW(name, node->supers[1], type));
|
||||
TRACE (GOBJECT_TYPE_NEW (name, node->supers[1], (uintmax_t) type));
|
||||
|
||||
node->plugin = plugin;
|
||||
node->n_children = 0;
|
||||
@@ -1906,7 +1906,7 @@ g_type_create_instance (GType type)
|
||||
}
|
||||
#endif
|
||||
|
||||
TRACE(GOBJECT_OBJECT_NEW(instance, type));
|
||||
TRACE (GOBJECT_OBJECT_NEW (instance, (uintmax_t) type));
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
Reference in New Issue
Block a user