Skip to content
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

trace: fix coverity warnings #1024

Merged
merged 2 commits into from
Dec 7, 2023
Merged

trace: fix coverity warnings #1024

merged 2 commits into from
Dec 7, 2023

Conversation

alfredh
Copy link
Contributor

@alfredh alfredh commented Dec 7, 2023

Fixes around 4 warnings from Coverity 2023.6

145int re_trace_init(const char *json_file)
146{
147        int err = 0;
148
149#ifndef RE_TRACE_ENABLED
150        return 0;
151#endif
152
     	CID 469999: Structurally dead code (UNREACHABLE) [[select issue](https://scan8.scan.coverity.com/defectInstanceId=13589814&fileInstanceId=88291432&mergedDefectId=469999)]
153        if (!json_file)
154                return EINVAL;
155
156        if (re_atomic_rlx(&trace.init))
157                return EALREADY;

@sreimers sreimers merged commit 74dc01d into main Dec 7, 2023
44 checks passed
@sreimers sreimers deleted the alfredh_trace_coverity branch December 7, 2023 19:16
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.

2 participants