vpnor: Fix style issues reported by clang tooling
The files in this commit need to be changed to fix a warning found in
the latest gcc version. The issue has to do with using the following
syntax:
`const decltype(auto)`
First update the files in question to match with the latest clang11
formatting.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: If728d370665b42f2ccafea84dbfd50a2ae80c77a
diff --git a/vpnor/table.cpp b/vpnor/table.cpp
index 8c5b882..8d0fab2 100644
--- a/vpnor/table.cpp
+++ b/vpnor/table.cpp
@@ -2,7 +2,8 @@
// Copyright (C) 2018 IBM Corp.
#include "config.h"
-extern "C" {
+extern "C"
+{
#include "backend.h"
#include "common.h"
#include "mboxd.h"
@@ -14,9 +15,10 @@
#include <endian.h>
#include <syslog.h>
+#include <phosphor-logging/elog-errors.hpp>
+
#include <algorithm>
#include <fstream>
-#include <phosphor-logging/elog-errors.hpp>
#include <regex>
namespace openpower
diff --git a/vpnor/table.hpp b/vpnor/table.hpp
index e42e8d8..d3ccb55 100644
--- a/vpnor/table.hpp
+++ b/vpnor/table.hpp
@@ -8,7 +8,8 @@
#include <numeric>
#include <vector>
-extern "C" {
+extern "C"
+{
#include "backend.h"
#include "common.h"
#include "vpnor/backend.h"
@@ -265,8 +266,7 @@
{
public:
ReasonedError(const std::string&& what) : _what(what)
- {
- }
+ {}
const char* what() const noexcept
{
return _what.c_str();
@@ -285,8 +285,7 @@
{
public:
TocEntryError(const std::string&& reason) : ReasonedError(std::move(reason))
- {
- }
+ {}
};
/** @brief The exception thrown on finding a syntax error in the ToC entry
@@ -299,8 +298,7 @@
public:
MalformedTocEntry(const std::string&& reason) :
TocEntryError(std::move(reason))
- {
- }
+ {}
};
/** @brief The exception thrown on finding a semantic error in the ToC entry
@@ -313,16 +311,14 @@
public:
InvalidTocEntry(const std::string&& reason) :
TocEntryError(std::move(reason))
- {
- }
+ {}
};
class UnmappedOffset : public std::exception
{
public:
UnmappedOffset(size_t base, size_t next) : base(base), next(next)
- {
- }
+ {}
const size_t base;
const size_t next;
@@ -333,8 +329,7 @@
public:
OutOfBoundsOffset(const std::string&& reason) :
ReasonedError(std::move(reason))
- {
- }
+ {}
};
class UnknownPartition : public ReasonedError
@@ -342,8 +337,7 @@
public:
UnknownPartition(const std::string&& reason) :
ReasonedError(std::move(reason))
- {
- }
+ {}
};
} // namespace virtual_pnor