Page MenuHomeFreeBSD

siftr: fix a build error for powerpc and arm platforms
ClosedPublic

Authored by cc on May 29 2023, 5:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 11:42 AM
Unknown Object (File)
Tue, Apr 30, 11:11 PM
Unknown Object (File)
Sat, Apr 27, 12:30 AM
Unknown Object (File)
Sat, Apr 27, 12:30 AM
Unknown Object (File)
Sat, Apr 27, 12:30 AM
Unknown Object (File)
Fri, Apr 26, 10:32 PM
Unknown Object (File)
Apr 15 2024, 12:54 AM
Unknown Object (File)
Mar 15 2024, 1:13 AM

Details

Summary

This is introduced by commit aa61cff4249c. So I pick up the type "jd" as the fix where it used to work.

The error is:

/usr/src/sys/netinet/siftr.c:394:6: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]

pkt_node->tval.tv_sec,
^~~~~~~~~~~~~~~~~~~~~

1 error generated.

81.86 real        93.27 user         7.53 sys

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51759
Build 48650: arc lint + arc unit

Event Timeline

cc requested review of this revision.May 29 2023, 5:36 PM
cc edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 29 2023, 7:28 PM
markmi_dsl-only.net added inline comments.
sys/netinet/siftr.c
391

%jd is for intmax_t as the expected type of argument.

(That sets up for the following comment.)

394

So the above line should be:

(intmax_t) pkt_node->tval.tv_sec,
sys/netinet/siftr.c
394

Hmm. I see the email notification for this did not match for which line is "above".

"the pkt_node->tval.tv_sec line" would have been a better wording, given the overall handling.

cc marked an inline comment as done.May 30 2023, 12:14 AM
cc added inline comments.
sys/netinet/siftr.c
394

Oh, my bad. I just realized it should be converted to intmax_t.

cc marked an inline comment as done.May 30 2023, 10:39 AM
cc added inline comments.
sys/netinet/siftr.c
394