Re: [PATCH 1/1] aiodio: Fix format string for 32bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
> On 32bit char pointer is int and size_t is unsigned int,
> Cast to long / unsigned long.

Actually char pointer is char pointer, that is not an integer type at
all. If you do a pointer difference you end up with an signed integer
value of ptrdiff_t type, because unlike the result of sizeof(foo)
pointer difference can be negative as well. In C99 ptrdiff_t can be
printed as %td see the "Length modifier" part of man 3 printf.

-- 
Cyril Hrubis
chrubis@xxxxxxx



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux