Skip to content

Commit

Permalink
Fix compile warnings (#1228)
Browse files Browse the repository at this point in the history
with the -pedantic flag. 

Signed-off-by: Peter Tisovčík <mienkofax@gmail.com>

* fix ignoring pragma warning

Signed-off-by: Peter Tisovčík <mienkofax@gmail.com>

* fix unused parameter _value

Signed-off-by: Peter Tisovčík <mienkofax@gmail.com>
  • Loading branch information
mienkofax authored and Fishwaldo committed May 24, 2017
1 parent b761382 commit e49ac4d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions cpp/src/aes/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ typedef union
uint8_t b[4];
} aes_inf;

#ifdef _MSC_VER
#pragma warning( disable : 4324 )
#endif

#ifdef _WIN64
__declspec(align(16))
Expand All @@ -90,7 +92,9 @@ typedef struct
aes_inf inf;
} aes_decrypt_ctx;

#ifdef _MSC_VER
#pragma warning( default : 4324 )
#endif

/* This routine must be called before first use if non-static */
/* tables are being used */
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/value_classes/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace OpenZWave
bool GetChangeVerified() { return m_verifyChanges; }

virtual string const GetAsString() const { return ""; }
virtual bool SetFromString( string const& _value ) { return false; }
virtual bool SetFromString( string const& ) { return false; }

bool Set(); // For the user to change a value in a device

Expand Down
8 changes: 4 additions & 4 deletions cpp/src/value_classes/ValueList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ void ValueList::OnValueRefreshed
// <ValueList::GetItemIdxByLabel>
// Get the index of an item from its label
//-----------------------------------------------------------------------------
int32 const ValueList::GetItemIdxByLabel
int32 ValueList::GetItemIdxByLabel
(
string const& _label
)
) const
{
for( int32 i=0; i<(int32)m_items.size(); ++i )
{
Expand All @@ -312,10 +312,10 @@ int32 const ValueList::GetItemIdxByLabel
// <ValueList::GetItemIdxByValue>
// Get the index of an item from its value
//-----------------------------------------------------------------------------
int32 const ValueList::GetItemIdxByValue
int32 ValueList::GetItemIdxByValue
(
int32 const _value
)
) const
{
for( int32 i=0; i<(int32)m_items.size(); ++i )
{
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/value_classes/ValueList.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ namespace OpenZWave

Item const* GetItem() const;

int32 const GetItemIdxByLabel( string const& _label );
int32 const GetItemIdxByValue( int32 const _value );
int32 GetItemIdxByLabel( string const& _label ) const;
int32 GetItemIdxByValue( int32 const _value ) const;

bool GetItemLabels( vector<string>* o_items );
bool GetItemValues( vector<int32>* o_values );

uint8 const GetSize()const{ return m_size; }
uint8 GetSize()const{ return m_size; }

private:
vector<Item> m_items;
Expand Down

0 comments on commit e49ac4d

Please sign in to comment.