[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/10] ccid-card-emulated: fix cast warning/error
From: |
marcandre . lureau |
Subject: |
[PATCH 01/10] ccid-card-emulated: fix cast warning/error |
Date: |
Tue, 3 Jan 2023 15:08:05 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
../hw/usb/ccid-card-emulated.c: In function 'handle_apdu_thread':
../hw/usb/ccid-card-emulated.c:251:24: error: cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]
251 | assert((unsigned long)event > 1000);
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
hw/usb/ccid-card-emulated.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index ee41a81801..c328660075 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -248,7 +248,7 @@ static void *handle_apdu_thread(void* arg)
WITH_QEMU_LOCK_GUARD(&card->vreader_mutex) {
while (!QSIMPLEQ_EMPTY(&card->guest_apdu_list)) {
event = QSIMPLEQ_FIRST(&card->guest_apdu_list);
- assert((unsigned long)event > 1000);
+ assert(event != NULL);
QSIMPLEQ_REMOVE_HEAD(&card->guest_apdu_list, entry);
if (event->p.data.type != EMUL_GUEST_APDU) {
DPRINTF(card, 1, "unexpected message in
handle_apdu_thread\n");
--
2.39.0
- [PATCH 00/10] Various win32 fixes & new 'get-win32-socket' QMP command, marcandre . lureau, 2023/01/03
- [PATCH 02/10] tests: fix path separator, use g_build_filename(), marcandre . lureau, 2023/01/03
- [PATCH 03/10] tests: fix test-io-channel-command on win32, marcandre . lureau, 2023/01/03
- [PATCH 01/10] ccid-card-emulated: fix cast warning/error,
marcandre . lureau <=
- [PATCH 04/10] tests/docker: fix a win32 error due to portability, marcandre . lureau, 2023/01/03
- [PATCH 05/10] tests/readconfig: spice doesn't support unix socket on windows yet, marcandre . lureau, 2023/01/03
- [PATCH 06/10] osdep: implement qemu_socketpair() for win32, marcandre . lureau, 2023/01/03
- [PATCH 07/10] qmp: 'add_client' actually expects sockets, marcandre . lureau, 2023/01/03
- [PATCH 08/10] qmp: add 'get-win32-socket', marcandre . lureau, 2023/01/03