cd /usr/src/sbin/growfs make -DGFSDBG Returns errors while building. Probably because the debug code is normally execluded. 2* int versus u_int_32 2* char-pointer cast to uint-pointer First is fixed by changing type Second is fixed by getting the compiler to ignore the warning. Which IMHO is valid since compiling GFSDBG is only done if you sort of know what is going on..... Perhaps a suggestion on debugging on the manual page would be approriate as well. Tested on 10.1, but probably valid on others as well. svn diff: Index: sbin/growfs/Makefile =================================================================== --- sbin/growfs/Makefile (revision 281869) +++ sbin/growfs/Makefile (working copy) @@ -17,6 +17,8 @@ .if defined(GFSDBG) SRCS+= debug.c +CFLAGS+=-DFS_DEBUG +NO_WCAST_ALIGN= yes .endif DPADD= ${LIBUTIL} Index: sbin/growfs/growfs.c =================================================================== --- sbin/growfs/growfs.c (revision 281869) +++ sbin/growfs/growfs.c (working copy) @@ -161,7 +161,7 @@ #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; @@ -242,7 +242,7 @@ #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs;
A commit references this bug: Author: trasz Date: Fri Apr 24 12:48:49 UTC 2015 New revision: 281929 URL: https://svnweb.freebsd.org/changeset/base/281929 Log: Fix growfs(8) build with debug enabled (make -DGFSDBG). PR: 199641 Submitted by: Willem Jan Withagen <wjw at digiware dot nl> MFC after: 1 month Sponsored by: The FreeBSD Foundation Changes: head/sbin/growfs/Makefile head/sbin/growfs/growfs.c
MFC-ed to 10 as r284669.