Fix warning: 'inner_impl' may be used uninitialized - #612
Conversation
dsharlet
left a comment
There was a problem hiding this comment.
This really needs to remain uninitialized, it's worth optimizing every single cycle from this function.
Why doesn't `
| // We need to replace the implementation of the last loop. | ||
| for_each_loop<BufsSize>* inner_loop = offset_bytes_non_null(loop, -sizeof_for_each_loop(bufs.size())); | ||
| assert(inner_impl); | ||
| (void)inner_impl; |
There was a problem hiding this comment.
Why doesn't this solve the problem?
There was a problem hiding this comment.
Doesn't this fix unused, bit not unitialized?
| } | ||
|
|
||
| for_each_loop_impl<BufsSize> inner_impl; | ||
| for_each_loop_impl<BufsSize> inner_impl = nullptr; |
There was a problem hiding this comment.
I really wanted to leave this uninitialized, I'm trying to optimize every last cycle from this function.
|
Okay, I tried some other ways to disable this warning, but none of them helped. There are some compiler specific ways to disable warnings for specific piece of code, but I guess we don't want them. I guess we can just ignore this warning, but I'm worrying it'll make it easier to miss some more important ones. |
No description provided.