* [Qemu-devel] [PULL] libcacard fixes
@ 2013-12-09 13:37 Alon Levy
2013-12-09 13:37 ` [Qemu-devel] [PULL] libcacard: Fix compilation for older versions of glib (bug #1258168) Alon Levy
0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2013-12-09 13:37 UTC (permalink / raw)
To: qemu-devel
Anthony,
The following changes since commit a1d22a367d5780c9553b2cd5a24f665534ce6ed6:
target-cris: Use new qemu_ld/st opcodes (2013-12-08 09:36:02 +0100)
are available in the git repository at:
git://people.freedesktop.org/~alon/qemu libcacard_ccid.4
for you to fetch changes up to 5ad04fb6f112cf2917909be4c22109dbb65fed18:
libcacard: Fix compilation for older versions of glib (bug #1258168) (2013-12-09 12:19:05 +0200)
Please pull,
Thanks,
Alon
Stefan Weil (1):
libcacard: Fix compilation for older versions of glib (bug #1258168)
libcacard/vscclient.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.8.4.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] [PULL] libcacard: Fix compilation for older versions of glib (bug #1258168)
2013-12-09 13:37 [Qemu-devel] [PULL] libcacard fixes Alon Levy
@ 2013-12-09 13:37 ` Alon Levy
0 siblings, 0 replies; 2+ messages in thread
From: Alon Levy @ 2013-12-09 13:37 UTC (permalink / raw)
To: qemu-devel
From: Stefan Weil <sw@weilnetz.de>
See https://bugs.launchpad.net/bugs/1258168
libcacard/vscclient.c: In function 'do_socket_read':
libcacard/vscclient.c:410: warning: implicit declaration of function 'g_warn_if_reached'
libcacard/vscclient.c:410: warning: nested extern declaration of 'g_warn_if_reached'
libcacard/vscclient.c: In function 'main':
libcacard/vscclient.c:763: warning: implicit declaration of function 'g_byte_array_unref'
libcacard/vscclient.c:763: warning: nested extern declaration of 'g_byte_array_unref'
...
libcacard/vscclient.o: In function `do_socket_read':
libcacard/vscclient.c:410: undefined reference to `g_warn_if_reached'
libcacard/vscclient.o: In function `main':
libcacard/vscclient.c:763: undefined reference to `g_byte_array_unref'
g_warn_if_reached was added in glib 2.16, and g_byte_array_unref is
supported since glib 2.22. QEMU requires glib 2.12, so both names must
not be used.
Instead of showing a warning for code which should not be reached,
vscclient better stop running, so g_warn_if_reached is not useful for
vscclient.
In libcacard/vsclient.c, g_byte_array_unref can be replaced by
g_byte_array_free. This is not generally true, so adding a compatibility
layer in include/glib-compat.h is no option here.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Reported-by: Don Slutz <dslutz@verizon.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
libcacard/vscclient.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index a3cb776..f1d46d3 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -407,7 +407,7 @@ do_socket_read(GIOChannel *source,
}
break;
default:
- g_warn_if_reached();
+ g_assert_not_reached();
return FALSE;
}
@@ -760,7 +760,7 @@ main(
g_io_channel_unref(channel_stdin);
g_io_channel_unref(channel_socket);
- g_byte_array_unref(socket_to_send);
+ g_byte_array_free(socket_to_send, TRUE);
closesocket(sock);
return 0;
--
1.8.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-09 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 13:37 [Qemu-devel] [PULL] libcacard fixes Alon Levy
2013-12-09 13:37 ` [Qemu-devel] [PULL] libcacard: Fix compilation for older versions of glib (bug #1258168) Alon Levy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).