-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixed lorawan unittests valgrind issues #8453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@hasnainvirk please review |
@@ -64,7 +65,9 @@ TEST_F(Test_LoRaMac, initialize) | |||
object->bind_phy(phy); | |||
|
|||
lorawan_connect_t conn; | |||
memset(&conn, 0, sizeof(conn)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more elegantly and correctly done as lorawan_connect_t conn = { 0 };
, although GCC sometimes annoyingly and pointlessly complains about missing braces.
In C++98 you can also do lorawan_connect_t conn = lorawan_connect_t();
C++11 would allow the terser lorawan_connect_t conn{};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
/morph build |
@AnttiKauppila Thanks for the fix! |
@cmonr Yesterday we had 1 hour for the fix. So made sure that valgrind warnings were not fatal. And today Antti completes the task with zero warnings. Thanks for the support. |
Build : FAILUREBuild number : 3381 |
IAR network license issues. |
Build : SUCCESSBuild number : 3385 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3017 |
Description
LoRaWAN unit tests are having lots of valgrind issues because of unitialized variables
Those are now fixed
Pull request type