From 41fbf0b0c228205828823dd98ce5a5181527c429 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Mon, 3 Dec 2018 16:36:37 -0800 Subject: bugfix: add fixes to mock class The mock class is only compiled when included. Add a missing semicolon to the class definition. The interface class was renamed, update the name from which the mock class derives. Tested: Added a local instance of the object that forces compilation. Change-Id: I65dd92e1e29d0cf0532ebe209b356d3d8fe4f1d8 Signed-off-by: Patrick Venture --- phosphor-logging/test/sdjournal_mock.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phosphor-logging/test/sdjournal_mock.hpp b/phosphor-logging/test/sdjournal_mock.hpp index 3290480..b907bcc 100644 --- a/phosphor-logging/test/sdjournal_mock.hpp +++ b/phosphor-logging/test/sdjournal_mock.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -9,7 +10,7 @@ namespace phosphor namespace logging { -class SdJournalMock : public SdJournalImpl +class SdJournalMock : public SdJournalHandler { public: virtual ~SdJournalMock() = default; @@ -18,10 +19,11 @@ class SdJournalMock : public SdJournalImpl MOCK_METHOD1(journal_send_call, int(const char*)); int journal_send(const char* fmt, ...) override + __attribute__((format(printf, 2, 0))) __attribute__((sentinel)) { return journal_send_call(fmt); } -} +}; } // namespace logging } // namespace phosphor -- cgit v1.2.1