From 627e9f660ce1e1a944b1a206f8c6ebb9f7efeaa0 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sun, 8 Dec 2019 17:29:36 +1000 Subject: [PATCH] Clean up clang warnings --- src/includes/dinit-client.h | 4 ++-- src/includes/proc-service.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/includes/dinit-client.h b/src/includes/dinit-client.h index a6afe2a..09746c9 100644 --- a/src/includes/dinit-client.h +++ b/src/includes/dinit-client.h @@ -49,14 +49,14 @@ template class static_membuf template static_membuf(const T &val) { - static_assert(sizeof(T) == N); + static_assert(sizeof(T) == N, "must initialise with object of correct size"); memcpy(buf, &val, N); } template static_membuf(char (&prevbuf)[M], const T &val) { - static_assert(M + sizeof(T) == N); + static_assert(M + sizeof(T) == N, "size is not correct"); memcpy(buf, prevbuf, M); memcpy(buf + M, &val, sizeof(val)); } diff --git a/src/includes/proc-service.h b/src/includes/proc-service.h index 7056a6d..a3ff05a 100644 --- a/src/includes/proc-service.h +++ b/src/includes/proc-service.h @@ -446,8 +446,8 @@ class process_service : public base_process_service return inittab_line; } - constexpr size_t get_utmp_id_size() { return sizeof(inittab_id); } - constexpr size_t get_utmp_line_size() { return sizeof(inittab_line); } + constexpr size_t get_utmp_id_size() const { return sizeof(inittab_id); } + constexpr size_t get_utmp_line_size() const { return sizeof(inittab_line); } #endif -- 2.25.1