Avoid multiple compiler warnings such as the following:
main.c: In function ‘update’:
main.c:157:4: warning: pointer targets in passing argument 1 of ‘mem_getusage’ differ in signedness [-Wpointer-sign]
mem_getusage(&mem_usage, &swap_usage, &mem_opts);
^
In file included from main.c:29:0:
mem.h:16:6: note: expected ‘int *’ but argument is of type ‘unsigned int *’
void mem_getusage(int *per_mem, int *per_swap, const struct mem_options *opts);
^
Avoid the following compiler warning:
dockapp.c: In function ‘dockapp_open_window’:
dockapp.c:51:16: warning: variable ‘stat’ set but not used [-Wunused-but-set-variable]
Status stat;
^
Previously, kvm_read was used to get the memory usage in FreeBSD. However,
this has been deprecated in favor of sysctl. This patch implements this
change.
Some work had previously been done in this direction, as could be seen in
the file src/mem_freebsd_sysctl.c. Since this file is no longer needed, it
has been removed.
Additionally, some formatting has been done on the remaining older code for
a more consistent style.