[yelp/wip/kill-gnome-common: 3/16] Fix cast warnings in decompressor tests
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp/wip/kill-gnome-common: 3/16] Fix cast warnings in decompressor tests
- Date: Thu, 29 Jan 2015 14:23:35 +0000 (UTC)
commit a99eb40439cb868918fd45016263d26dfaf1a9b6
Author: David King <amigadave amigadave com>
Date: Thu Jan 29 13:37:23 2015 +0000
Fix cast warnings in decompressor tests
tests/test-bz2.c | 5 +++--
tests/test-lzma.c | 5 +++--
tests/test-magic.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-bz2.c b/tests/test-bz2.c
index bcc7e63..f663414 100644
--- a/tests/test-bz2.c
+++ b/tests/test-bz2.c
@@ -43,8 +43,9 @@ main (int argc, char **argv)
file = g_file_new_for_path (argv[1]);
file_stream = g_file_read (file, NULL, NULL);
- converter = yelp_bz2_decompressor_new ();
- stream = g_converter_input_stream_new (file_stream, converter);
+ converter = G_CONVERTER (yelp_bz2_decompressor_new ());
+ stream = g_converter_input_stream_new (G_INPUT_STREAM (file_stream),
+ converter);
while ((bytes = g_input_stream_read (stream, buf, 1024, NULL, NULL)) > 0) {
gchar *out = g_strndup (buf, bytes);
diff --git a/tests/test-lzma.c b/tests/test-lzma.c
index 6f02643..32a1431 100644
--- a/tests/test-lzma.c
+++ b/tests/test-lzma.c
@@ -43,8 +43,9 @@ main (int argc, char **argv)
file = g_file_new_for_path (argv[1]);
file_stream = g_file_read (file, NULL, NULL);
- converter = yelp_lzma_decompressor_new ();
- stream = g_converter_input_stream_new (file_stream, converter);
+ converter = G_CONVERTER (yelp_lzma_decompressor_new ());
+ stream = g_converter_input_stream_new (G_INPUT_STREAM (file_stream),
+ converter);
while ((bytes = g_input_stream_read (stream, buf, 1024, NULL, NULL)) > 0) {
gchar *out = g_strndup (buf, bytes);
diff --git a/tests/test-magic.c b/tests/test-magic.c
index ecacd14..e0f3fc8 100644
--- a/tests/test-magic.c
+++ b/tests/test-magic.c
@@ -43,8 +43,9 @@ main (int argc, char **argv)
file = g_file_new_for_path (argv[1]);
file_stream = g_file_read (file, NULL, NULL);
- converter = yelp_magic_decompressor_new ();
- stream = g_converter_input_stream_new (file_stream, converter);
+ converter = G_CONVERTER (yelp_magic_decompressor_new ());
+ stream = g_converter_input_stream_new (G_INPUT_STREAM (file_stream),
+ converter);
while ((bytes = g_input_stream_read (stream, buf, 1024, NULL, NULL)) > 0) {
gchar *out = g_strndup (buf, bytes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]