]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix warnings with lib/libpmc
authorngie <ngie@FreeBSD.org>
Sun, 14 Apr 2019 00:06:49 +0000 (00:06 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 14 Apr 2019 00:06:49 +0000 (00:06 +0000)
commit9db6ab92672704ab59859df7e76a6f0d0427f234
tree67f251a3b4d3109079559fb716c8b51aad8f51fd
parent76b7f077ad331970419cb2ccdfc98d3818b3853c
Fix warnings with lib/libpmc

* Use `MIN` instead of similar hand rolled macro.
* Sort headers.
* Use `errno.h` instead of `sys/errno.h`.
* Wrap the argument to sizeof in parentheses for clarity.
* Remove `__BSD_VISIBLE` and `_XOPEN_SOURCE` #defines to mute warnings about
  incompatible snprintf definitions.

This fixes a number of warnings I've been seeing lately in my builds.

Sort makefile variables per style.Makefile(9) (`CFLAGS`/`CWARNFLAG.gcc`) and
bump `WARNS` to 3.

MFC after: 2 weeks
Reviewed by: jtl
Approved by: jtl (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D19851
lib/libpmc/Makefile
lib/libpmc/Makefile.inc [new file with mode: 0644]
lib/libpmc/libpmc_json.cc
lib/libpmc/pmu-events/jevents.c
lib/libpmc/pmu-events/jevents.h