Strange warning...
Gary E. Miller
gem at rellim.com
Tue Aug 26 04:01:06 UTC 2025
Yo Hal!
On Mon, 25 Aug 2025 20:48:55 -0700
Hal Murray via devel <devel at ntpsec.org> wrote:
> Anybody understand this one?
Yeah. Type Cassting is now considered suspect, if not totally bad.
> That's running on a Pi 1, with -O3
> cc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516
> Raspbian GNU/Linux 9 (stretch) 9.13
> No warning with -O1
>
> ../../ntpd/ntp_util.c:566:2: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
>
> refid_t refid = *(const uint32_t*)rbufp->pkt.refid;
include/recvbuff.h: struct parsed_pkt pkt; /* host-order copy of data from wire */
pkt is NOT a (const uint32_t *)
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20250825/70e5000a/attachment.bin>
More information about the devel
mailing list