biddyweb / sctp-refimpl

Automatically exported from code.google.com/p/sctp-refimpl
0 stars 0 forks source link

cosmetic issue: printf format warning for tv.tv_usec in usrsctplib/user_socket.c #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. bootstrap/configure/make KERN/usrsctp on mint linux (based on ubuntu 12.10)
2. Compilation fails in usrsctplib/user_socket.c
user_socket.c: In function 'usrsctp_dumppacket':
user_socket.c:3122:11: error: format '%d' expects argument of type 'int', but 
argument 8 has type '__suseconds_t' [-Werror=format]

tv_usec is suseconds_t which may be defined differently on different platforms. 
One way to deal with this is to print tv_usec as %jd and typecast argument to 
intmax_t. See attached patch.

Original issue reported on code.google.com by art...@gmail.com on 7 Jan 2013 at 10:46

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in
https://code.google.com/p/sctp-refimpl/source/detail?r=8412&path=/trunk/KERN/usr
sctp/usrsctplib/user_socket.c
Thanks for reporting.

Original comment by t00FC...@googlemail.com on 2 Jul 2014 at 3:46