[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/15] ccid-card-emulated: fix cast warning/error
From: |
Laurent Vivier |
Subject: |
[PULL 11/15] ccid-card-emulated: fix cast warning/error |
Date: |
Wed, 18 Jan 2023 08:52:30 +0100 |
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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230103110814.3726795-2-marcandre.lureau@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
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 ee41a818014b..c32866007549 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.38.1
- [PULL 03/15] hw/intc: Move some files out of the target-specific source set, (continued)
- [PULL 03/15] hw/intc: Move some files out of the target-specific source set, Laurent Vivier, 2023/01/18
- [PULL 02/15] hw/display: Move omap_lcdc.c out of target-specific source set, Laurent Vivier, 2023/01/18
- [PULL 04/15] hw/tpm: Move tpm_ppi.c out of target-specific source set, Laurent Vivier, 2023/01/18
- [PULL 06/15] hw/cpu: Mark arm11 and realview mpcore as target-independent code, Laurent Vivier, 2023/01/18
- [PULL 05/15] hw/arm: Move various units to softmmu_ss[], Laurent Vivier, 2023/01/18
- [PULL 09/15] tests/qtest/test-hmp: Improve the check for verbose mode, Laurent Vivier, 2023/01/18
- [PULL 08/15] hw/usb: Mark the XLNX_VERSAL-related files as target-independent, Laurent Vivier, 2023/01/18
- [PULL 07/15] hw/intc: Mark more interrupt-controller files as target independent, Laurent Vivier, 2023/01/18
- [PULL 10/15] hw/i386/pc: Remove unused 'owner' argument from pc_pci_as_mapping_init, Laurent Vivier, 2023/01/18
- [PULL 12/15] hw/pvrdma: Protect against buggy or malicious guest driver, Laurent Vivier, 2023/01/18
- [PULL 11/15] ccid-card-emulated: fix cast warning/error,
Laurent Vivier <=
- [PULL 13/15] hw/cxl/cxl-cdat.c: spelling: missmatch, Laurent Vivier, 2023/01/18
- [PULL 14/15] hw/cxl/cxl-host: Fix an error message typo, Laurent Vivier, 2023/01/18
- [PULL 01/15] Call qemu_socketpair() instead of socketpair() when possible, Laurent Vivier, 2023/01/18
- [PULL 15/15] hw/ssi/sifive_spi.c: spelling: reigster, Laurent Vivier, 2023/01/18
- Re: [PULL 00/15] Trivial branch for 8.0 patches, Peter Maydell, 2023/01/19