- Ignore failure to remove our temp file.
- Avoid a minor memory leak in the -D case.
Reported by: Coverity (CID 1502534, 1502535, 1502538)
MFC after: 1 week
Sponsored by: Klara, Inc.
Differential D38038
tzcode: Silence warnings. des on Jan 13 2023, 3:24 PM. Authored by Tags None Referenced Files
Subscribers
Details
Reported by: Coverity (CID 1502534, 1502535, 1502538)
Diff Detail
Event TimelineComment Actions A better commit message would be useful here. Why do you need to ignore the return value from remove? Comment Actions Not entirely sure what you're asking here. If you're asking why I added the (void): to shut Coverity up. If you're asking why Coverity is complaining: because it has a rule that the result of file system operations must be checked. If you're asking why none of this matters: because what we're removing here is our temporary file and we don't really care if we fail. Comment Actions The last one: We're trying remove our temp file, but it doesn't matter if it fails in the places we ignore. So, I'm suggesting that you add that to the commit message to capture more of the 'why' behind this commit. Comment Actions
If this is warranted then I think a comment in the src is better than the commit message. Comment Actions Yea, but right now the commit message is an unhelpful "Silence warnings" without providing a larger context. And the commit, except for the moving of Dflag, just tosses some (void) casts on some functions without explanation of why that's OK. A sentence that says this is OK in the commit message is a fine ask, imho, though a comment would be good too... We rarely add (void) casts these days since Coverity is the only tool that likes to complain about ignoring return values though... So that's my thinking behind my comments.. |