Date: Tue, 7 Jan 2020 00:39:36 -0800 From: Mark Millard <marklmi@yahoo.com> To: "mjg@freebsd.org " <mjg@FreeBSD.org>, svn-src-head@freebsd.org Subject: Re: svn commit: r356437 - head/lib/libprocstat Message-ID: <B5A3A3FC-8170-4555-A9B7-F684070B1FD0@yahoo.com> References: <B5A3A3FC-8170-4555-A9B7-F684070B1FD0.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
(Derived from O. Hartmann's report, despite his not having the same source version, . . .) In the code: 823 static struct filestat_list * 824 procstat_getfiles_sysctl(struct procstat *procstat, struct = kinfo_proc *kp, 825 int mmapped) 826 { 827 struct kinfo_file *kif, *files; . . . 841 switch(procstat->type) { 842 case PROCSTAT_SYSCTL: 843 files =3D kinfo_getfile(kp->ki_pid, &cnt); 844 break; 845 case PROCSTAT_CORE: 846 files =3D kinfo_getfile_core(procstat->core, = &cnt); 847 break; 848 default: 849 assert(!"invalid type"); 850 } 851 if (files =3D=3D NULL && errno !=3D EPERM) { 852 for the "default:" case, if assert is disabled to be a no-op via NDEBUG, then files would be tested in an uninitialized state. The compiler complaint seems valid for this. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B5A3A3FC-8170-4555-A9B7-F684070B1FD0>