diff options
| author | 15:08:59 Tim Janik <timj@imendio.com> | 2007-12-10 14:07:42 +0000 |
|---|---|---|
| committer | Tim Janik <timj@src.gnome.org> | 2007-12-10 14:07:42 +0000 |
| commit | cc3de68e2151cf3341115212c56c17714ca03bb2 (patch) | |
| tree | ae3ddda4c88630bec70e1cf3430e007849bedfc5 /gio/goutputstream.c | |
| parent | 0dbfa89ba1a781ec45763433e379572ed3257470 (diff) | |
| download | glib-cc3de68e2151cf3341115212c56c17714ca03bb2.tar.gz | |
http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
2007-12-10 15:08:59 Tim Janik <timj@imendio.com>
* let g_warn_if_fail replace g_assert as discussed here:
http://mail.gnome.org/archives/gtk-devel-list/2007-October/msg00089.html
* fix bug #502498: Test framework assertion failures should follow
gcc error format.
* gmessages.h, gmessages.c: deprecated g_assert_warning() which is
unused now. removed g_assert*() definitions whcih are provided by
gtestutils.h now. added g_warn_if_reached() and g_warn_if_fail()
which are recommended as g_assert/g_assert_not_reached replacements
for non-test programs.
added g_warn_message() to implement g_warn_*() macros.
use emacs-next-error friendly formatting for file:line: for warnings.
* gtestutils.h, gtestutils.c: use emacs-next-error friendly formatting.
implement g_assert_not_reached() with g_assertion_message() and
g_assert() in terms of g_assertion_message_expr() so we'll be able to
provide assertion messages in test logs.
* gkeyfile.c, gbookmarkfile.c: changed g_assert*() to g_warn_if_fail()
or g_return_if_fail() where suitable.
* gio/: changed g_assert to g_warn_if_fail.
svn path=/trunk/; revision=6086
Diffstat (limited to 'gio/goutputstream.c')
| -rw-r--r-- | gio/goutputstream.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gio/goutputstream.c b/gio/goutputstream.c index f827c81a5..f1f780e21 100644 --- a/gio/goutputstream.c +++ b/gio/goutputstream.c @@ -1151,7 +1151,7 @@ g_output_stream_real_write_finish (GOutputStream *stream, GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); WriteData *op; - g_assert (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_write_async); + g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_write_async); op = g_simple_async_result_get_op_res_gpointer (simple); return op->count_written; } @@ -1221,7 +1221,7 @@ g_output_stream_real_splice_finish (GOutputStream *stream, GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); SpliceData *op; - g_assert (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_splice_async); + g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_splice_async); op = g_simple_async_result_get_op_res_gpointer (simple); return op->bytes_copied; } @@ -1317,7 +1317,7 @@ g_output_stream_real_close_finish (GOutputStream *stream, GError **error) { GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result); - g_assert (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_close_async); + g_warn_if_fail (g_simple_async_result_get_source_tag (simple) == g_output_stream_real_close_async); return TRUE; } |
