Page MenuHomeFreeBSD

Fix architectures where pointer and u_int have different sizes
ClosedPublic

Authored by lwhsu on Jan 25 2018, 8:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 29 2023, 4:09 PM
Unknown Object (File)
Dec 20 2023, 4:58 AM
Unknown Object (File)
Nov 23 2023, 9:20 PM
Unknown Object (File)
Sep 16 2023, 12:15 AM
Unknown Object (File)
Jul 3 2023, 5:20 AM
Unknown Object (File)
Jul 3 2023, 5:20 AM
Unknown Object (File)
Jul 3 2023, 5:18 AM
Unknown Object (File)
Jul 1 2023, 1:56 AM
Subscribers

Details

Summary

r328383 seems breaking architectures where pointer and u_int have different
sizes:

https://ci.freebsd.org/job/FreeBSD-head-mips64-build/105/console

00:03:54.601 cc1: warnings being treated as errors
00:03:54.601 /usr/src/sbin/fsck_ffs/fsutil.c: In function 'flush':
00:03:54.601 /usr/src/sbin/fsck_ffs/fsutil.c:372: warning: cast from pointer to integer of different size
00:03:54.601 /usr/src/sbin/fsck_ffs/fsutil.c:372: warning: cast from pointer to integer of different size

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14574
Build 14708: arc lint + arc unit

Event Timeline

This is the right fix.

This revision is now accepted and ready to land.Jan 25 2018, 8:31 AM
This revision was automatically updated to reflect the committed changes.
head/sbin/fsck_ffs/fsutil.c
372 ↗(On Diff #38438)

I'm not 100% sure if this is correct.

I _think_ the intention was to give on-disk address (probably b_bno) as the memory pointer is less useful for debugging purposes since we are about to abort.

Looking at the context, it seems this is really an assertion that flush() is called with &sblk for BT_SUPERBLK, is this a valid assertion for setup.c:244? (I haven't worked on fsck for quite a few years so it's probably a good idea to defer this to McKusick).