cppcheck warning suppressions

This commit is contained in:
Pavel Kirienko
2014-08-03 14:27:33 +04:00
parent 63843285a0
commit 6c972e6ba5
7 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ struct UAVCAN_EXPORT IsDynamicallyAllocatable
{
static void check()
{
char dummy[(sizeof(T) <= MemPoolBlockSize) ? 1 : -1];
char dummy[(sizeof(T) <= MemPoolBlockSize) ? 1 : -1] = { '0' };
(void)dummy;
}
};
@@ -210,7 +210,7 @@ class UAVCAN_EXPORT YamlStreamer<FloatSpec<BitLen, CastMode> >
typedef typename FloatSpec<BitLen, CastMode>::StorageType StorageType;
public:
template <typename Stream>
template <typename Stream> // cppcheck-suppress passedByValue
static void stream(Stream& s, const StorageType value, int)
{
s << value;
@@ -153,7 +153,7 @@ class UAVCAN_EXPORT YamlStreamer<IntegerSpec<BitLen, Signedness, CastMode> >
typedef typename RawType::StorageType StorageType;
public:
template <typename Stream>
template <typename Stream> // cppcheck-suppress passedByValue
static void stream(Stream& s, const StorageType value, int)
{
// Get rid of character types - we want its integer representation, not ASCII code
@@ -76,7 +76,7 @@ private:
uint32_t response_failure_count_;
ResponseType response_;
void handleReceivedDataStruct(ReceivedDataStructure<RequestType>& request)
virtual void handleReceivedDataStruct(ReceivedDataStructure<RequestType>& request)
{
UAVCAN_ASSERT(request.getTransferType() == TransferTypeServiceRequest);
if (try_implicit_cast<bool>(callback_, true))
+1 -1
View File
@@ -69,7 +69,7 @@ private:
Callback callback_;
void handleReceivedDataStruct(ReceivedDataStructure<DataType_>& msg)
virtual void handleReceivedDataStruct(ReceivedDataStructure<DataType_>& msg)
{
if (try_implicit_cast<bool>(callback_, true))
{