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)
Fri, Mar 15, 1:13 AM
Unknown Object (File)
Feb 12 2024, 10:03 AM
Unknown Object (File)
Dec 20 2023, 3:58 AM
Unknown Object (File)
Dec 12 2023, 8:15 AM
Unknown Object (File)
Sep 6 2023, 8:23 AM
Unknown Object (File)
Aug 14 2023, 11:21 PM
Unknown Object (File)
Aug 14 2023, 12:04 PM
Unknown Object (File)
Aug 11 2023, 10:35 PM

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 Not Applicable
Unit
Tests Not Applicable

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