Skip to content

Fix some issues reported by Coverity #2184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 9, 2019

Conversation

dscho
Copy link
Member

@dscho dscho commented May 9, 2019

I only swept the report broadly, looking for some obvious things we might want to fix.

dscho added 10 commits May 9, 2019 12:26
In bff014d (builtin rebase: support the `verbose` and `diffstat`
options, 2018-09-04), we added a line that wanted to remove the
`REBASE_DIFFSTAT` bit from the flags, but it used an incorrect negation.

Found by Coverity.

Signed-off-by: Johannes Schindelin <[email protected]>
This was overlooked in 53bbcfb (rebase -i: implement the main part
of interactive rebase as a builtin, 2018-09-27).

Found by Coverity.

Signed-off-by: Johannes Schindelin <[email protected]>
In 06f5608 (bisect--helper: `bisect_start` shell function partially
in C, 2019-01-02), we introduced a call to `get_oid()` and did not check
whether it succeeded before using its output.

Signed-off-by: Johannes Schindelin <[email protected]>
Just a little defensive coding.

Found by Coverity.

Signed-off-by: Johannes Schindelin <[email protected]>
…ation failed

Just an obvious fix for an obvious varargs mistake.

Signed-off-by: Johannes Schindelin <[email protected]>
We specifically reduce the number of parallel links for MSVC, as RAM
usage is an issue with MSVC's parallel mode, manifested in the symptom:

	fatal error LNK1318: Unexpected PDB error; OK (0) ''

Signed-off-by: Johannes Schindelin <[email protected]>
We do not actually need to test for `state != NULL`, as
`state->delayed_checkout` had already been accessed before this.

Signed-off-by: Johannes Schindelin <[email protected]>
We do fall back to not enabling the FSCache when we're out of
Thread-Local indexes, but we failed to unlock the mutex.

Signed-off-by: Johannes Schindelin <[email protected]>
The return value of that function is not actually we are currently able
to translate to an `errno`-style value easily. So let's just not.

Signed-off-by: Johannes Schindelin <[email protected]>
Coverity pointed out a couple of bugs, and here are fixes for some of
them.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the address-coverity-report branch from 32a8612 to 32b5d74 Compare May 9, 2019 12:51
@dscho dscho merged commit 2ac5f42 into git-for-windows:master May 9, 2019
@dscho dscho deleted the address-coverity-report branch May 9, 2019 14:31
@dscho dscho added this to the v2.21.0(2) milestone May 9, 2019
git-for-windows-ci pushed a commit that referenced this pull request May 9, 2019
Fix some issues reported by Coverity
dscho added a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
dscho added a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
dscho added a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
git-for-windows-ci pushed a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
git-for-windows-ci pushed a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
git-for-windows-ci pushed a commit that referenced this pull request May 10, 2019
Fix some issues reported by Coverity
dscho added a commit that referenced this pull request May 13, 2019
Fix some issues reported by Coverity
dscho added a commit that referenced this pull request May 13, 2019
Fix some issues reported by Coverity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant