Date: Mon, 04 Jul 2016 21:07:48 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 210827] lang/gcc6: gcc-6.1.0/gcc/gcov-tool.c's do_overlap(. . .) can return uninitialized "int ret" Message-ID: <bug-210827-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210827 Bug ID: 210827 Summary: lang/gcc6: gcc-6.1.0/gcc/gcov-tool.c's do_overlap(. . .) can return uninitialized "int ret" Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: gerald@FreeBSD.org Reporter: markmi@dsl-only.net Flags: maintainer-feedback?(gerald@FreeBSD.org) Assignee: gerald@FreeBSD.org gcc-6.1.0/gcc/gcov-tool.c has code of the structure: static int do_overlap (int argc, char **argv) { int opt; int ret; optind =3D 0; while ((opt =3D getopt_long (argc, argv, "vfFoht:", overlap_options, NULL= )) !=3D -1) { . . . (no assignments to ret) . . . } if (argc - optind =3D=3D 2) ret =3D profile_overlap (argv[optind], argv[optind+1]); else overlap_usage (); return ret; } In the "else" case the ret value is uninitialized but would later be return= ed. This was reported by the compiler used when I built lang/gcc6. I have not built/checked other lang/gcc*'s or devel/*gcc*'s. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210827-13>