mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 07:36:17 +01:00
Use g_abort() instead of abort() where possible
https://bugzilla.gnome.org/show_bug.cgi?id=665446
This commit is contained in:
parent
5974428d25
commit
e47904a26f
@ -254,7 +254,7 @@ g_on_error_stack_trace (const gchar *prg_name)
|
||||
if (IsDebuggerPresent ())
|
||||
G_BREAKPOINT ();
|
||||
else
|
||||
abort ();
|
||||
g_abort ();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -798,7 +798,7 @@ g_io_win32_prepare (GSource *source,
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
if (channel->debug)
|
||||
g_print ("\n");
|
||||
@ -945,7 +945,7 @@ g_io_win32_check (GSource *source)
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1010,7 +1010,7 @@ g_io_win32_finalize (GSource *source)
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
if (channel->debug)
|
||||
g_print ("\n");
|
||||
@ -1299,7 +1299,7 @@ g_io_win32_fd_seek (GIOChannel *channel,
|
||||
default:
|
||||
whence = -1; /* Keep the compiler quiet */
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
tmp_offset = offset;
|
||||
@ -1694,7 +1694,7 @@ g_io_channel_new_file (const gchar *filename,
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
/* always open 'untranslated' */
|
||||
@ -1740,7 +1740,7 @@ g_io_channel_new_file (const gchar *filename,
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
return channel;
|
||||
@ -2229,7 +2229,7 @@ g_io_channel_win32_make_pollfd (GIOChannel *channel,
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
fd->events = condition;
|
||||
|
@ -324,7 +324,7 @@ _g_log_abort (gboolean breakpoint)
|
||||
if (breakpoint)
|
||||
G_BREAKPOINT ();
|
||||
else
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
@ -1190,7 +1190,7 @@ g_assert_warning (const char *log_domain,
|
||||
line,
|
||||
pretty_function);
|
||||
_g_log_abort (FALSE);
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ static void
|
||||
terminate (void)
|
||||
{
|
||||
kill (getpid(), SIGTERM);
|
||||
abort();
|
||||
g_abort();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -846,7 +846,7 @@ g_test_log (GTestLogType lbit,
|
||||
{
|
||||
if (test_tap_log)
|
||||
g_print ("Bail out!\n");
|
||||
abort();
|
||||
g_abort();
|
||||
}
|
||||
if (result == G_TEST_RUN_SKIPPED)
|
||||
test_skipped_count++;
|
||||
@ -2426,7 +2426,7 @@ g_assertion_message (const char *domain,
|
||||
_exit (1);
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2459,7 +2459,7 @@ g_assertion_message_expr (const char *domain,
|
||||
if (test_in_subprocess)
|
||||
_exit (1);
|
||||
else
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "gmessages.h"
|
||||
#include "gstrfuncs.h"
|
||||
#include "gmain.h"
|
||||
#include "gutils.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -74,7 +75,7 @@ g_thread_abort (gint status,
|
||||
{
|
||||
fprintf (stderr, "GLib (gthread-posix.c): Unexpected error from C library during '%s': %s. Aborting.\n",
|
||||
function, strerror (status));
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
/* {{{1 GMutex */
|
||||
@ -1296,7 +1297,7 @@ g_mutex_clear (GMutex *mutex)
|
||||
if G_UNLIKELY (mutex->i[0] != 0)
|
||||
{
|
||||
fprintf (stderr, "g_mutex_clear() called on uninitialised or locked mutex\n");
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1322,7 +1323,7 @@ g_mutex_unlock_slowpath (GMutex *mutex,
|
||||
if G_UNLIKELY (prev == 0)
|
||||
{
|
||||
fprintf (stderr, "Attempt to unlock mutex that was not locked\n");
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
syscall (__NR_futex, &mutex->i[0], (gsize) FUTEX_WAKE_PRIVATE, (gsize) 1, NULL);
|
||||
|
@ -58,7 +58,7 @@ g_thread_abort (gint status,
|
||||
{
|
||||
fprintf (stderr, "GLib (gthread-win32.c): Unexpected error from C library during '%s': %s. Aborting.\n",
|
||||
strerror (status), function);
|
||||
abort ();
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
/* Starting with Vista and Windows 2008, we have access to the
|
||||
|
Loading…
Reference in New Issue
Block a user