rtorrent
rtorrent copied to clipboard
command_dynamic.cc: uninitialized 'new_flags'
…
command_dynamic.cc:330:14: warning: variable 'new_flags' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (options.find("list") != std::string::npos)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
command_dynamic.cc:340:50: note: uninitialized use occurs here
return system_method_insert_object(new_args, new_flags);
^~~~~~~~~
command_dynamic.cc:330:10: note: remove the 'if' if its condition is always true
else if (options.find("list") != std::string::npos)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
command_dynamic.cc:322:18: note: initialize the variable 'new_flags' to silence this warning
int new_flags;
^
= 0
…
(clang/ macOS)
This has already been fixed in master as part of 7659cd0ec0e6c1ba6da40c4957487cc97d9c9023