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)
Wed, Jan 29, 2:18 PM
Unknown Object (File)
Fri, Jan 17, 4:03 AM
Unknown Object (File)
Sun, Jan 12, 5:09 PM
Unknown Object (File)
Sun, Jan 12, 4:50 PM
Unknown Object (File)
Dec 25 2024, 12:35 AM
Unknown Object (File)
Dec 15 2024, 3:06 AM
Unknown Object (File)
Sep 24 2024, 5:18 PM
Unknown Object (File)
Sep 19 2024, 5:26 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).