From: Anders F Björklund Date: Sun, 12 Aug 2018 14:06:39 +0000 (+0200) Subject: Rename hash_debug, add matching end function X-Git-Tag: v3.5~34^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b3a8282a5714bcb55907afe3d8f1a71e3300bad;p=thirdparty%2Fccache.git Rename hash_debug, add matching end function Remove the parameter stating if hit or miss --- diff --git a/src/ccache.c b/src/ccache.c index 8292bf7ef..1c597ad14 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -481,15 +481,15 @@ debug_start(const char *path) { char *hash_bin = format("%s%s", path, ".ccache-hashX"); char *hash_txt = format("%s%s", path, ".ccache-input"); - hash_debug(hash_bin, hash_txt); + hash_debug_init(hash_bin, hash_txt); free(hash_bin); free(hash_txt); } static void -debug_end(bool hit) +debug_end() { - (void) hit; + hash_debug_end(); char *path = format("%s%s", output_obj, ".ccache-log"); cc_copylog(path); free(path); @@ -2071,7 +2071,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) } if (conf->debug) { - debug_end(true); + debug_end(); } // And exit with the right status code. @@ -3468,7 +3468,7 @@ ccache(int argc, char *argv[]) to_cache(compiler_args); if (conf->debug) { - debug_end(false); + debug_end(); } x_exit(0); diff --git a/src/ccache.h b/src/ccache.h index 2c320d83c..a7730fea6 100644 --- a/src/ccache.h +++ b/src/ccache.h @@ -118,7 +118,8 @@ bool args_equal(struct args *args1, struct args *args2); // ---------------------------------------------------------------------------- // hash.c -void hash_debug(const char *bin, const char *txt); +void hash_debug_init(const char *bin, const char *txt); +void hash_debug_end(void); void hash_start(struct mdfour *md); void hash_buffer(struct mdfour *md, const void *s, size_t len); char *hash_result(struct mdfour *md); diff --git a/src/hash.c b/src/hash.c index 5a5bd27eb..f49dfd7f8 100644 --- a/src/hash.c +++ b/src/hash.c @@ -26,7 +26,7 @@ char *debug_hash_bin; // text input, for debugging char *debug_hash_txt; -void hash_debug(const char *bin, const char *txt) +void hash_debug_init(const char *bin, const char *txt) { static char *hash_types = "cdp"; // common, direct, cpp if (bin) { @@ -43,6 +43,10 @@ void hash_debug(const char *bin, const char *txt) } } +void hash_debug_end() +{ +} + static void hash_binary_buffer(struct mdfour *md, const void *s, size_t len) {