Skip to content

Conversation

@ysyrota
Copy link
Contributor

@ysyrota ysyrota commented May 7, 2025

Muted cppcheck on false positive

Description

This fix is intended to mute the following cppcheck warning:

test-duoapi.c:43:22: warning: Uninitialized variable: params [uninitvar]
                if ((params[i].key = strsep(&p, "=")) == NULL)
                     ^
test-duoapi.c:80:[5](https://github.com/duosecurity/libduo/actions/runs/14867606827/job/41748192934#step:5:6)8: note: Calling function '_parse_line', 4th argument 'params' value is <Uninit>
                if ((n = _parse_line(buf, &method, &uri, params,
                                                         ^
test-duoapi.c:3[8](https://github.com/duosecurity/libduo/actions/runs/14867606827/job/41748192934#step:5:9):49: note: Assuming condition is false
        if ((*method = strsep(&p, " ")) == NULL ||
                                                ^
test-duoapi.c:43:22: note: Uninitialized variable: params
                if ((params[i].key = strsep(&p, "=")) == NULL)

How Has This Been Tested?

CI

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@AaronAtDuo AaronAtDuo merged commit 4b3686e into duosecurity:master May 7, 2025
1 check passed
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