summaryrefslogtreecommitdiffstats
path: root/include/raul/Semaphore.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-06-28 22:57:52 -0400
committerDavid Robillard <d@drobilla.net>2022-06-28 23:10:11 -0400
commitcde85f3f450f7c3f12e1f7c4a70cb374e4756319 (patch)
treea7c29860f761f0876d753c85856f88d8993f6643 /include/raul/Semaphore.hpp
parent5f12264cddac578f74dee7e12411c57eed4d3eae (diff)
downloadraul-cde85f3f450f7c3f12e1f7c4a70cb374e4756319.tar.gz
raul-cde85f3f450f7c3f12e1f7c4a70cb374e4756319.tar.bz2
raul-cde85f3f450f7c3f12e1f7c4a70cb374e4756319.zip
Remove redundant `struct` keys
Because this is C++ code, GCC 12 says things like: Socket.hpp:166:24: error: redundant class-key ‘struct’ in reference to ‘struct sockaddr_un’ [-Werror=redundant-tags]
Diffstat (limited to 'include/raul/Semaphore.hpp')
-rw-r--r--include/raul/Semaphore.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/raul/Semaphore.hpp b/include/raul/Semaphore.hpp
index f4dc447..a30737b 100644
--- a/include/raul/Semaphore.hpp
+++ b/include/raul/Semaphore.hpp
@@ -256,7 +256,7 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait)
namespace chr = std::chrono;
// Use clock_gettime to ensure sem_timedwait uses the same clock
- struct timespec time {};
+ timespec time{};
clock_gettime(CLOCK_REALTIME, &time);
const auto now(chr::seconds(time.tv_sec) + chr::nanoseconds(time.tv_nsec));
@@ -265,8 +265,8 @@ Semaphore::timed_wait(const std::chrono::duration<Rep, Period>& wait)
const chr::seconds end_sec(chr::duration_cast<chr::seconds>(end));
const chr::nanoseconds end_nsec(end - end_sec);
- const struct timespec ts_end = {static_cast<time_t>(end_sec.count()),
- static_cast<long>(end_nsec.count())};
+ const timespec ts_end = {static_cast<time_t>(end_sec.count()),
+ static_cast<long>(end_nsec.count())};
return (sem_timedwait(&_sem, &ts_end) == 0);
}