C - rychly dotaz
Milan B.
milan na bastl.sk
Středa Březen 21 09:22:17 CET 2018
Len odhad ... skuste tie struktury pomenovat struct {...} meno;
(obvykle svoje odpovede najprv testujem, ale ku kompilatoru sa dostanem
az neskor, takze len odhad)
-m-
On 21.03.2018 9:09, Jaroslav Buchta wrote:
> #define SECTOR_FSRECSZ 128
>
> typedef struct
> {
> uint32_t id;
> union
> {
> struct
> {
> uint8_t b[SECTOR_FSRECSZ-4-4];
> uint32_t crc32;
> };
> struct
> {
> time64_ms tmLastSms;
> };
> };
> } FLASHFSREC;
>
>
> proc je sizeof(FLASHFSREC) == 136 a ne 128???
>
> Asi jsem neco prehlednul, kdyz odstranim tmLastSms je to 128...
>
> _______________________________________________
> HW-list mailing list - sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list
------------- další část ---------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3980 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://list.hw.cz/pipermail/hw-list/attachments/20180321/8f624321/attachment-0001.bin>
Další informace o konferenci Hw-list