]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't clean up the clang diagnostics file in failure cases
authorryb <ryb@ableton.com>
Sat, 7 Feb 2015 14:30:16 +0000 (15:30 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 9 Feb 2015 20:32:04 +0000 (21:32 +0100)
It isn't necessary to remove the file as it will be overwritten when re-running
the compiler in failed(). tmp_unlink() is the wrong function to use in any case,
as the file is not temporary and could be on an NFS volume (see the comment for
tmp_unlink()).

ccache.c

index 581d59c410c0cd57cee4d40f04863c94f65d45d3..ce6da8a274f7f2f13d0a670150843337e1ff2f24 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -781,9 +781,6 @@ to_cache(struct args *args)
                stats_update(STATS_STDOUT);
                tmp_unlink(tmp_stdout);
                tmp_unlink(tmp_stderr);
-               if (output_dia) {
-                       tmp_unlink(output_dia);
-               }
                failed();
        }
        tmp_unlink(tmp_stdout);
@@ -845,9 +842,6 @@ to_cache(struct args *args)
                }
 
                tmp_unlink(tmp_stderr);
-               if (output_dia) {
-                       tmp_unlink(output_dia);
-               }
                failed();
        }