Page MenuHomeFreeBSD

Fix build on non-64bit architectures
ClosedPublic

Authored by lwhsu on Jan 25 2018, 5:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 21, 4:04 PM
Unknown Object (File)
Fri, Jun 21, 1:19 PM
Unknown Object (File)
Feb 14 2024, 9:13 PM
Unknown Object (File)
Dec 20 2023, 3:32 AM
Unknown Object (File)
Jul 14 2023, 10:38 PM
Unknown Object (File)
Jan 6 2023, 2:16 PM
Unknown Object (File)
Dec 25 2022, 7:18 AM
Unknown Object (File)
Nov 27 2022, 9:26 AM
Subscribers

Details

Summary

r328351 seems breaks the architectures where size_t is not unsigned long:

https://ci.freebsd.org/job/FreeBSD-head-mips-build/95/console

00:06:35.591 --- kern_malloc.o ---
00:06:35.591 cc1: warnings being treated as errors
00:06:35.591 /usr/src/sys/kern/kern_malloc.c: In function 'malloc':
00:06:35.591 /usr/src/sys/kern/kern_malloc.c:532: warning: passing argument 2 of 'malloc_dbg' from incompatible pointer type
00:06:35.592 /usr/src/sys/kern/kern_malloc.c: In function 'malloc_domain':
00:06:35.592 /usr/src/sys/kern/kern_malloc.c:582: warning: passing argument 2 of 'malloc_dbg' from incompatible pointer type

BTW, I see more places in this files use unsigned long as size or alignment, should they also be changed?

Diff Detail

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

Event Timeline

First: Sure, this change seems good.

Second: It's not clear to me -- why is size_t not unsigned long on MIPS? Or is this a long vs long long (but both are 64 bits) type complaint?

Third: Yes, John would like many more of those unsigned longs to become size_t. I'm on board. If this is what is needed to unbreak the build, though, there's no need to do that other stuff at the same time.

This revision is now accepted and ready to land.Jan 25 2018, 6:32 AM
This revision was automatically updated to reflect the committed changes.

Thanks, I just wanted to fix the build first.

For the second, I am not sure, either. I guess the compiler just complains about types are different.

For the third, good to know that, I also don't want to do these change at the same time.