Commit 99b1ea4a authored by deuce's avatar deuce
Browse files

Use the cross-platform XP_PRIsize_t macro for *printf() formatting of a

size_t.
parent 0b28b83a
......@@ -64,7 +64,7 @@ int pktdump(FILE* fp, const char* fname)
fpkdmsg_t pkdmsg;
if(fread(&pkthdr,sizeof(pkthdr),1,fp) != 1) {
fprintf(stderr,"%s !Error reading pkthdr (%lu bytes)\n"
fprintf(stderr,"%s !Error reading pkthdr (%" XP_PRIsize_t "u bytes)\n"
,fname,sizeof(pkthdr));
return(-1);
}
......@@ -194,15 +194,15 @@ int main(int argc, char** argv)
bodyfp=nulfp;
if(sizeof(fpkthdr_t)!=FIDO_PACKET_HDR_LEN) {
printf("sizeof(fpkthdr_t)=%lu, expected: %d\n",sizeof(fpkthdr_t),FIDO_PACKET_HDR_LEN);
printf("sizeof(fpkthdr_t)=%" XP_PRIsize_t "u, expected: %d\n",sizeof(fpkthdr_t),FIDO_PACKET_HDR_LEN);
return(-1);
}
if(sizeof(fpkdmsg_t)!=FIDO_PACKED_MSG_HDR_LEN) {
printf("sizeof(fpkdmsg_t)=%lu, expected: %d\n",sizeof(fpkdmsg_t),FIDO_PACKED_MSG_HDR_LEN);
printf("sizeof(fpkdmsg_t)=%" XP_PRIsize_t "u, expected: %d\n",sizeof(fpkdmsg_t),FIDO_PACKED_MSG_HDR_LEN);
return(-1);
}
if(sizeof(fmsghdr_t)!=FIDO_STORED_MSG_HDR_LEN) {
printf("sizeof(fmsghdr_t)=%lu, expected: %d\n",sizeof(fmsghdr_t),FIDO_STORED_MSG_HDR_LEN);
printf("sizeof(fmsghdr_t)=%" XP_PRIsize_t "u, expected: %d\n",sizeof(fmsghdr_t),FIDO_STORED_MSG_HDR_LEN);
return(-1);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment