brbzull0 opened a new pull request, #13849:
URL: https://github.com/apache/trafficserver/pull/13849

   `append_option_data()` copies `env_value` into the per-option state when an 
option that declares an environment variable is given without a value. 
`env_value` is a local of that occurrence and is not read after the copy, so 
this moves it instead. `set_env()` takes its own copy of the value earlier in 
the same block.
   
   Coverity CID: 1688253
   
   **What changes:** the copy-assignment at that line becomes a 
move-assignment. The ArgParser test cases in `test_tscore` pass before and 
after.
   
   **What this PR does not do:** the other copies of `env_value` in 
`append_option_data()` and `Command::parse()` stay as they are. The value is 
read again after each of them (the bare-option state after `set_env()`, and the 
fill loop in `parse()`), so moving there would be wrong.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to