This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/82648] New: libiberty/regex.c:2364]: pointless test ?
- From: "dcb314 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Oct 2017 09:37:14 +0000
- Subject: [Bug other/82648] New: libiberty/regex.c:2364]: pointless test ?
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82648
Bug ID: 82648
Summary: libiberty/regex.c:2364]: pointless test ?
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
trunk/libiberty/regex.c:2364]: (style) Checking if unsigned variable 'size' is
less than zero.
Source code is
if (size < 0)
but
size_t size;
Maybe the error return value from function convert_mbs_to_wcs is zero
and so the test should be
if (size == 0)