Bug 11156 - Use of x_unlink() instead of unlink() per HACKING.txt
Summary: Use of x_unlink() instead of unlink() per HACKING.txt
Status: CLOSED FIXED
Alias: None
Product: ccache
Classification: Unclassified
Component: ccache (show other bugs)
Version: dev
Hardware: All All
: P5 normal
Target Milestone: 3.2.2
Assignee: Joel Rosdahl
QA Contact: Joel Rosdahl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 15:52 UTC by ishikawa
Modified: 2015-05-10 12:33 UTC (History)
0 users

See Also:


Attachments
Use x_unlink() instead of unlink() per HACKING.txt (635 bytes, patch)
2015-03-11 15:52 UTC, ishikawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ishikawa 2015-03-11 15:52:07 UTC
Created attachment 10857 [details]
Use x_unlink() instead of unlink() per HACKING.txt

CAVEAT: The uploaded patch was created during the work to support
-gsplit-dwarf (FissionDwarf) of GCC.  (See bug 10005 )
Some of the patches have interdependence and if earlier patches are
not applied, the later ones may fail. I will re-create patches
appropriately depending on how an earlier patch is incorporated (or
dropped).

The whole list of broken patches below were uploaded in bug 10005 for
convenience, but now separate bugzilla is filed to follow up on each of it
(except for the main -gsplit-dwarf support, in bug 10005).

 0001-Harden-logging-perror-replaced-with-cc_log-and-fatal.patch
 0002-hash-file-creation-failure-is-recorded-now.patch
*0003-Use-x_unlink-instead-of-unlink-per-HACKING.txt.patch
 0004-make-sure-the-result-of-stat-call-is-checked.patch
 0005-Enhance-log-message-add-prefix-var.-name-and-a-few-a.patch
 0006-warning-about-missing-x_unlinks-when-get_file_from_c.patch
 0007-Support-for-gsplit-dwarf.patch
 0008-Missing-copy-of-diagnostics-file-in-case-of-failure.patch

What this entry is about:

Short explanation.

3: 0003-Use-x_unlink-instead-of-unlink-per-HACKING.txt.patch

   HACKING.txt suggests we should always use x_unlink() instead of
   plain unlink().

   I noticed a use of unlink() crept in, and this patch fixes it by
   using x_unlink().

   This is actually not related to the support for -gsplit-dwarf, and
   so I am filing this separate bugzilla.

   Since this changes ccache.c, it may interfere with the later
   patch application if this is not applied to ccache repository. (see
   bug 10005)

TIA
Comment 1 Joel Rosdahl 2015-03-14 15:15:44 UTC
Thanks, applied!
Comment 2 Joel Rosdahl 2015-05-10 12:33:19 UTC
Included in v3.2.2.