main.c: Remove unused EXIT_STATUS_EXACT option #2915
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In process there is a suspicious
options |= EXIT_STATUS_EXACT
that is run when the jq script is terminated byhalt
, orhalt_error
.That line of code acutally does nothing because options is a local argument variable, and is not passed as a pointer. It was probably meant
to be a
*options |= EXIT_STATUS_EXACT
with the options argument passed as aint *
.In any case, we do not want to run the code in main() that was supposed to run if
EXIT_STATUS_EXACT
is set (but didn't since it is never added to options); as far as I can tell, we only want to run that code when the --exit-status/-e option is passed.So I removed
EXIT_STATUS_EXACT
completely, and the useless assignment, instead of fixing it since it was not used for anything else.Useless assignment detected by clang-tidy.