]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - doc/sparse.txt
xfs_spaceman: add a superblock info command
[thirdparty/xfsprogs-dev.git] / doc / sparse.txt
1 This document describes how to use the sparse source code checking tool
2 to check the source code of the open source XFS commands and utilites
3 ("xfsprogs").
4
5 First you need to install sparse, either from your distribution or from
6 source as provided at http://www.kernel.org/pub/software/devel/sparse/.
7
8 To simply build the xfsprogs source code while checking the source using
9 sparse just set the compiler to cgcc, which is a wrapper that calls both
10 sparse and gcc using:
11
12 CC=cgcc ./configure
13
14 Now that default warnings from sparse are a little bit verbose checking
15 for various not that important things and also complaining about the
16 glibc system headers. It does however not check for bitwise annotation
17 which are very important for xfsprogs to verify the endianess handling
18 of the on-disk structures is correct. To get a more reasonable set
19 of warnings build xfsprogs using:
20
21 LCFLAGS="-Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl" make
22
23 You are of course free to experiment with the warnings flags documented
24 in the sparse manpage to check xfsprogs for other issues.