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)
Sun, Dec 15, 3:06 AM
Unknown Object (File)
Sep 24 2024, 5:18 PM
Unknown Object (File)
Sep 19 2024, 5:26 AM
Unknown Object (File)
Sep 8 2024, 11:17 AM
Unknown Object (File)
Sep 8 2024, 9:20 AM
Unknown Object (File)
Sep 7 2024, 11:00 PM
Unknown Object (File)
Sep 7 2024, 1:38 PM
Unknown Object (File)
Sep 2 2024, 2:55 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 Not Applicable
Unit
Tests Not Applicable

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

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).