]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Comment out unused parameter name instead of using [[maybe_unused]]
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 27 Aug 2020 19:38:38 +0000 (21:38 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 28 Aug 2020 06:09:51 +0000 (08:09 +0200)
I think that it makes the code look cleaner if the parameter is
definitely unused.

src/Util.cpp
src/Win32Util.cpp

index 6b78b743e93750d03adeaec948913de31619f618..24d88c0e3f215db31758a7d00287df845d5ae974 100644 (file)
@@ -481,7 +481,7 @@ fallocate(int fd, long new_size)
   int err = 0;
   try {
     write_fd(fd, buf, bytes_to_write);
-  } catch ([[maybe_unused]] Error& e) {
+  } catch (Error&) {
     err = errno;
   }
   lseek(fd, saved_pos, SEEK_SET);
@@ -786,7 +786,7 @@ is_nfs_fd(int fd, bool* is_nfs)
 }
 #else
 int
-is_nfs_fd([[maybe_unused]] int fd, [[maybe_unused]] bool* is_nfs)
+is_nfs_fd(int /*fd*/, bool* /*is_nfs*/)
 {
   return -1;
 }
index 17c3b6330606b6fbc34fb0b3fbc2499b2f6ea382..354c9ae32e08c9d009f954bb4b1180cb8542581f 100644 (file)
@@ -98,7 +98,7 @@ argv_to_string(const char* const* argv, const std::string& prefix)
 // From: https://stackoverflow.com/a/58162122/262458
 #ifdef _MSC_VER
 int
-gettimeofday(struct timeval* tp, [[maybe_unused]] struct timezone* tzp)
+gettimeofday(struct timeval* tp, struct timezone* /*tzp*/)
 {
   namespace sc = std::chrono;
   sc::system_clock::duration d = sc::system_clock::now().time_since_epoch();