Codebase list libfreefare / upstream/libnfc-1.7.0_rc7
Fix warning Function call argument is an uninitialized value acr122_usb.c:237:3: warning: Function call argument is an uninitialized value LOG_HEX(NFC_LOG_GROUP_COM, "TX", abtTx, szTx); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../libnfc/log.h:107:7: note: expanded from macro 'LOG_HEX' snprintf (__acBuf + __szBuf, sizeof(__acBuf) - __szBuf, "%02x ",((uint8_t *)(pbtData))[__szPos]); \ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maybe a side effect of the #pragma pack not properly understood by the static analyser but anyway acr122_usb_frame_template is also used the same way to initialize the other frames Philippe Teuwen 10 years ago
1 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
781781 return res;
782782
783783 // Power On ICC
784 struct ccid_header ccid_frame = {
785 .bMessageType = PC_to_RDR_IccPowerOn,
786 .dwLength = 0,
787 .bSlot = 0,
788 .bSeq = 0,
789 .bMessageSpecific = { 0x01, 0x00, 0x00 },
784 uint8_t ccid_frame[] = {
785 PC_to_RDR_IccPowerOn, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00
790786 };
791787
792 if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), (unsigned char *)&ccid_frame, sizeof(struct ccid_header), 1000)) < 0)
788 if ((res = acr122_usb_bulk_write(DRIVER_DATA(pnd), ccid_frame, sizeof(struct ccid_header), 1000)) < 0)
793789 return res;
794790 if ((res = acr122_usb_bulk_read(DRIVER_DATA(pnd), abtRxBuf, sizeof(abtRxBuf), 1000)) < 0)
795791 return res;