Somil Gupta commented on a discussion: 
https://gitlab.rtems.org/rtems/rtos/rtems-examples/-/merge_requests/23#note_144452


Hi,

After fetching and building the latest main, the warning still appears in 
ticker/low_ticker2. It seems to come from the change in 
3d119b14519c060b7817b76502a8a5c7efc820eb from 
https://gitlab.rtems.org/rtems/rtos/rtems-examples/-/merge_requests/21 where 
%zd is used for uptime.tv_sec.

Since %zd expects a size_t but tv_sec is time_t, this triggers the format 
warning. My MR changes the specifier to %ld and casts uptime.tv_sec to long so 
the types match and the warning is removed. Using long for more portability . 
@joel 

![image.png](/uploads/9a1bdc0b56416a744e951f18ad7b8d83/image.png){width=805 
height=154}

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems-examples/-/merge_requests/23#note_144452
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to