osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/41176?usp=email )
Change subject: ccid_gen_notify_slot_status: add msgb_put cast ......................................................................
ccid_gen_notify_slot_status: add msgb_put cast
Fix this error seen in master-osmo-ccid-firmware after switching to debian trixie with 14.2:
../main.c:338:57: error: initialization of 'struct ccid_rdr_to_pc_notify_slot_change *' from incompatible pointer type 'unsigned char *' [-Wincompatible-pointer-types] 338 | struct ccid_rdr_to_pc_notify_slot_change *nsc = msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes));
Change-Id: I5618297533246adc8adaacf49fd58ec1f0f97cfc --- M sysmoOCTSIM/main.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c index 7d81853..fe569fd 100644 --- a/sysmoOCTSIM/main.c +++ b/sysmoOCTSIM/main.c @@ -335,7 +335,8 @@ uint8_t statusbytes[2] = {0}; //struct msgb *msg = ccid_msgb_alloc(); struct msgb *msg = msgb_alloc(300,"IRQ"); - struct ccid_rdr_to_pc_notify_slot_change *nsc = msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes)); + struct ccid_rdr_to_pc_notify_slot_change *nsc = + (struct ccid_rdr_to_pc_notify_slot_change *)msgb_put(msg, sizeof(*nsc) + sizeof(statusbytes)); nsc->bMessageType = RDR_to_PC_NotifySlotChange;
for(int i = 0; i <8; i++) {