freebsd-nq/config
Brian Behlendorf 0e6c493fec cppcheck: integrete cppcheck
In order for cppcheck to perform a proper analysis it needs to be
aware of how the sources are compiled (source files, include
paths/files, extra defines, etc).  All the needed information is
available from the Makefiles and can be leveraged with a generic
cppcheck Makefile target.  So let's add one.

Additional minor changes:

* Removing the cppcheck-suppressions.txt file.  With cppcheck 2.3
  and these changes it appears to no longer be needed.  Some inline
  suppressions were also removed since they appear not to be
  needed.  We can add them back if it turns out they're needed
  for older versions of cppcheck.

* Added the ax_count_cpus m4 macro to detect at configure time how
  many processors are available in order to run multiple cppcheck
  jobs.  This value is also now used as a replacement for nproc
  when executing the kernel interface checks.

* "PHONY =" line moved in to the Rules.am file which is included
  at the top of all Makefile.am's.  This is just convenient becase
  it allows us to use the += syntax to add phony targets.

* One upside of this integration worth mentioning is it now allows
  `make cppcheck` to be run in any directory to check that subtree.

* For the moment, cppcheck is not run against the FreeBSD specific
  kernel sources.  The cppcheck-FreeBSD target will need to be
  implemented and testing on FreeBSD to support this.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11508
2021-01-26 16:12:26 -08:00
..
.gitignore
Abigail.am Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
always-arch.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
always-compiler-options.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
always-cppcheck.m4 cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
always-python.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
always-pyzfs.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
always-sed.m4 Add compatibility for busybox mktemp 2020-12-03 10:01:16 -08:00
always-system.m4 OpenZFS restructuring - move platform specific headers 2019-09-05 09:34:54 -07:00
ax_code_coverage.m4 Import ZStandard v1.4.5 2020-08-20 10:30:06 -07:00
ax_count_cpus.m4 cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
ax_python_devel.m4
ax_restore_flags.m4
ax_save_flags.m4
config.awk
config.rpath Add config.rpath for AM_GNU_GETTEXT 2020-07-10 14:26:12 -07:00
CppCheck.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
deb.am Add compatibility for busybox mktemp 2020-12-03 10:01:16 -08:00
find_system_library.m4 Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
gettext.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
host-cpu-c-abi.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
iconv.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
intlmacosx.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
kernel-access-ok-type.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-acl.m4 Linux 5.11 compat: conftest 2020-12-27 16:15:19 -08:00
kernel-aio-fsync.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-automount.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-bdi.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-bio.m4 Linux 5.11 compat: conftest 2020-12-27 16:15:19 -08:00
kernel-blk-queue.m4 Linux 5.11 compat: conftest 2020-12-27 16:15:19 -08:00
kernel-blkdev.m4 Linux 5.11 compat: bdev_whole() 2020-12-27 16:20:33 -08:00
kernel-block-device-operations.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-clear-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-commit-metadata.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-config-defined.m4 Linux 5.11 compat: conftest 2020-12-27 16:15:19 -08:00
kernel-current-time.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-declare-event-class.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-dentry-operations.m4 Partially revert 5a6ac4c 2019-11-18 13:05:56 -08:00
kernel-dirty-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-discard-granularity.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-encode-fh-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-evict-inode.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fallocate.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-file-dentry.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-file-inode.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-fmode-t.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-follow-down-one.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fpu.m4 Linux 5.11 compat: conftest 2020-12-27 16:15:19 -08:00
kernel-fst-mount.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-fsync.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-generic_io_acct.m4 Linux 5.11 compat: bio_start_io_acct() / bio_end_io_acct() 2020-12-27 16:20:24 -08:00
kernel-generic_readlink.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-get-disk-ro.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-get-link.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-global_page_state.m4 Linux 5.9 compat: NR_SLAB_RECLAIMABLE 2020-08-29 20:57:45 -07:00
kernel-group-info.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-hotplug.m4 Implement memory and CPU hotplug 2020-12-10 14:09:23 -08:00
kernel-in-compat-syscall.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-create.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-inode-getattr.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-lock.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-lookup.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-inode-set-flags.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-set-iversion.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-inode-times.m4 config/kernel-inode-times: initialize timespec 2020-05-04 15:25:48 -07:00
kernel-insert-inode-locked.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-is_owner_or_cap.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmap-atomic-args.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmem-cache.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kmem.m4 Linux 5.8 compat: __vmalloc() 2020-06-08 16:32:02 -07:00
kernel-kstrtoul.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-ktime.m4 Linux 5.6 compat: ktime_get_raw_ts64() 2020-02-27 09:30:45 -08:00
kernel-kuid-helpers.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-kuidgid.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-lseek-execute.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-make-request-fn.m4 Linux 4.18.0-257.el8 compat: blk_alloc_queue() 2020-12-21 10:11:56 -08:00
kernel-misc-minor.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-mkdir-umode-t.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-mod-param.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-objtool.m4 Linux 5.10 compat: frame.h renamed objtool.h 2020-11-02 22:01:10 +00:00
kernel-pde-data.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-percpu.m4 Linux 5.10 compat: percpu_ref added data member 2020-11-02 22:01:19 +00:00
kernel-proc-operations.m4 Linux 5.6 compat: struct proc_ops 2020-02-07 11:03:53 -08:00
kernel-put-link.m4 Fix typos 2020-06-09 21:24:09 -07:00
kernel-rename.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-revalidate-disk-size.m4 Linux 5.11 compat: revalidate_disk_size() 2020-12-27 16:20:40 -08:00
kernel-rw.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-rwsem.m4 Delete rw_semaphore.wait_lock configure check 2020-12-09 21:22:54 -08:00
kernel-sched.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-security-inode-init.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-set-nlink.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-setattr-prepare.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-sget-args.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-show-options.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-shrink.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-super-userns.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-timer.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-tmpfile.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-totalhigh_pages.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-totalram-pages-func.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-truncate-setsize.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-userns-capabilities.m4 Linux 4.10 compat: has_capability() 2020-07-19 09:56:21 -07:00
kernel-usleep_range.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-vfs-direct_IO.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-fsync.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-vfs-getattr.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-iov_iter.m4 Linux 5.10 compat: use iov_iter in uio structure 2020-12-18 08:48:26 -08:00
kernel-vfs-iterate.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-vfs-rw-iterate.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-wait.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00
kernel-xattr-handler.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel-zlib.m4 Linux compat: Minimum kernel version 3.10 2019-11-12 08:59:06 -08:00
kernel.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
lib-ld.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
lib-link.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
lib-prefix.m4 Clarify comments in config/*.m4, vdev_geom.c, zfs_allow_*.ksh 2020-06-22 09:46:37 -07:00
mount-helper.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
nls.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
pkg.m4 Fix typos in config/ 2019-08-30 09:40:30 -07:00
po.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
progtest.m4 config: libintl/libiconv for gettext() detection 2019-04-19 12:09:29 -07:00
rpm.am config/zfs-build.m4: never define _initramfs in RPM_DEFINE_UTIL 2020-09-12 08:22:07 -07:00
Rules.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
Substfiles.am Centralize variable substitution 2020-07-14 17:33:44 -07:00
tgz.am Make RPM_DEFINE_KMOD conditional on CONFIG_KERNEL 2020-07-14 17:32:21 -07:00
toolchain-simd.m4 Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
user-clock_gettime.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
user-dracut.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-gettext.m4 Add config.rpath for AM_GNU_GETTEXT 2020-07-10 14:26:12 -07:00
user-libaio.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-libblkid.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-libcrypto.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-libexec.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-libtirpc.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-libudev.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-libuuid.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user-makedev.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-pam.m4 Use correct prefix for share/pam-configs 2020-07-30 09:09:46 -07:00
user-runstatedir.m4
user-systemd.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-sysvinit.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-udev.m4 Autoconf 2.70 compatibility 2021-01-02 16:55:55 -08:00
user-zlib.m4 Fix up FIND_SYSTEM_LIBRARY to work with cross-compiling 2020-07-10 14:26:40 -07:00
user.m4 Clean up lib dependencies 2020-07-10 14:26:00 -07:00
zfs-build.m4 cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zfs-meta.m4 Perform KABI checks in parallel 2019-10-01 12:50:34 -07:00