-
Notifications
You must be signed in to change notification settings - Fork 274
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
Fix minor build errors, such as unnecessary copies from range enumeration. #775
base: master
Are you sure you want to change the base?
Conversation
@prsunny Please help review this change. Thanks! |
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.
lgtm
@@ -590,7 +591,8 @@ void do_test_subscribe(bool wrap) | |||
hsub = events_init_subscriber_wrap(true, 100); | |||
} | |||
else { | |||
hsub = events_init_subscriber(true, 100); |
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.
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.
As comment
Problem
When building on ubuntu 22.04 with gcc 11.3, I am hitting a few minor errors during build: copies from for range enumeration and uninitialized variable before use.
More details are attached as below:
For range enumerations
Uninitialized variable
Fix
Changed range from value to reference as compiler suggested and initialized the uninitialized array as 0.