mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 00:06:24 +01:00
tests: add casts to avoid -Wformat errors on 32-bit Solaris builds
For historical reasons, pid_t & mode_t are defined as long instead of int for 32-bit processes in the Solaris headers, and even though they are the same size, gcc issues -Wformat headers if you try to print them with "%d" and "%u" instead of "%ld" & "%lu". Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
5aabd288ad
commit
b6004c70cc
@ -2469,7 +2469,7 @@ test_copy_preserve_mode (void)
|
|||||||
/* Reset the umask after querying it above. There’s no way to query it without
|
/* Reset the umask after querying it above. There’s no way to query it without
|
||||||
* changing it. */
|
* changing it. */
|
||||||
umask (current_umask);
|
umask (current_umask);
|
||||||
g_test_message ("Current umask: %u", current_umask);
|
g_test_message ("Current umask: %u", (unsigned int) current_umask);
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (vectors); i++)
|
for (i = 0; i < G_N_ELEMENTS (vectors); i++)
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,7 @@ test_child_private (void)
|
|||||||
spawn_flags |= G_SPAWN_DO_NOT_REAP_CHILD;
|
spawn_flags |= G_SPAWN_DO_NOT_REAP_CHILD;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_snprintf (pid, sizeof(pid), "%d", getpid ());
|
g_snprintf (pid, sizeof (pid), "%d", (int) getpid ());
|
||||||
child_argv[0] = local_argv[0];
|
child_argv[0] = local_argv[0];
|
||||||
child_argv[1] = "mapchild";
|
child_argv[1] = "mapchild";
|
||||||
child_argv[2] = pid;
|
child_argv[2] = pid;
|
||||||
|
Loading…
Reference in New Issue
Block a user