Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The return value of remove() is deliberately not checked, because it is expected to fail in the case where the file does not exist. If the file exists but cannot be removed, the rename() call will also fail and the error will be detected at that point. This is a valid exception (EXP12-EX1) to recommendation EXP12-AC. Do not ignore values returned by functions.

Compliant Solution (Preserve Existing Destination File)

...