Repository navigation
Conversation
|
IMHO, such risky (or incomplete) cleanup doesn't belong to a stable branch. |
| if (len < 0) | ||
| { | ||
| fclose(file); | ||
| (Arg::Gds(isc_fbsvcmgr_fp_read) << *av << Arg::OsError()).raise(); |
There was a problem hiding this comment.
Does fclose() clears the ftell() error ?
There was a problem hiding this comment.
No, but it’s not necessary. We only use errno after the function has returned an error, right?
There was a problem hiding this comment.
Not sure I've got you. You going to report OS error when there was no OS error ?
Else, why use OsError() here ?
There was a problem hiding this comment.
Vlad means that if successful fclose() clears the OS error code, what you're going to return in the exception?
There was a problem hiding this comment.
I got u. Yeah, i need to save value of errno before close the file.
There’s only one branch that I found when I entered v5 in the input. |
|
Unstable branch is called "master". |
By default (unless the opposite is suggested explicitly) all cleanup / refactoring belongs to the master branch and only then may be considered for backporting into stable branches. |
Summary
Fixes a set of warnings reported by the Svacer static analyzer.
Changes
ftell()instead of ignoring errorsEach fix is in a separate commit, so they can be reviewed one by one.
Behavior impact
These changes address potential defects and are not intended to alter expected behavior.