I just had a look at source code file fixincludes/fixincl.c

I can see that function test_for_changes makes a call
to close near the end of its definition as follows

  close (read_fd);  /* probably redundant, but I'm paranoid */

But around line 1352 of the same file is what
appears to be a redundant call to close.

        test_for_changes (read_fd);
        close (read_fd);

So there seems to be duplicate calls to close on the same
file descriptor.

Suggest remove the second call to close and re-word
the comment, which appears to be wrong, the close is required.


-- 
           Summary: fixincludes/fixincl.c: duplicate call to close ?
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40789

Reply via email to