Without this PR, I see the following warnings when compilation this library:
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_pll(uint64_t, si5351_pll)':
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:568:10: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
568 | delete params;
| ^~~~~~
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:522:35: note: returned from 'void* operator new [](std::size_t)'
522 | uint8_t *params = new uint8_t[20];
| ^
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_vcxo(uint64_t, uint8_t)':
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:1243:16: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
1243 | delete params;
| ^~~~~~
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:1206:41: note: returned from 'void* operator new [](std::size_t)'
1206 | uint8_t *params = new uint8_t[20];
| ^
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_ms(si5351_clock, Si5351RegSet, uint8_t, uint8_t, uint8_t)':
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:675:16: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
675 | delete params;
| ^~~~~~
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:586:41: note: returned from 'void* operator new [](std::size_t)'
586 | uint8_t *params = new uint8_t[20];
The changes in this PR fix these compiler warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this PR, I see the following warnings when compilation this library:
Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_pll(uint64_t, si5351_pll)': Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:568:10: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 568 | delete params; | ^~~~~~ Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:522:35: note: returned from 'void* operator new [](std::size_t)' 522 | uint8_t *params = new uint8_t[20]; | ^ Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_vcxo(uint64_t, uint8_t)': Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:1243:16: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 1243 | delete params; | ^~~~~~ Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:1206:41: note: returned from 'void* operator new [](std::size_t)' 1206 | uint8_t *params = new uint8_t[20]; | ^ Arduino/libraries/Etherkit_Si5351/src/si5351.cpp: In member function 'void Si5351::set_ms(si5351_clock, Si5351RegSet, uint8_t, uint8_t, uint8_t)': Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:675:16: warning: 'void operator delete(void*, std::size_t)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 675 | delete params; | ^~~~~~ Arduino/libraries/Etherkit_Si5351/src/si5351.cpp:586:41: note: returned from 'void* operator new [](std::size_t)' 586 | uint8_t *params = new uint8_t[20];The changes in this PR fix these compiler warnings.
Thanks for your time, and attention.