Skip to content

unit3205: suppress two clang-tidy false positives#20731

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:ctidyfp
Closed

unit3205: suppress two clang-tidy false positives#20731
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:ctidyfp

Conversation

@vszakats
Copy link
Member

Silencing:

tests/unit/unit3205.c:565:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  565 |         expect = (const char *)memcpy(alt, "DHE-", 4);
      |                                ^~~~~~            ~~~
      |                                strcpy
tests/unit/unit3205.c:569:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  569 |         expect = (const char *)memcpy(alt + 4, "DHE-", 4) - 4;
      |                                ^~~~~~                ~~~
      |                                strcpy

Ref: https://github.com/curl/curl/actions/runs/22425366818/job/64932197466?pr=20725

Cherry-picked from #20725

Silencing:
```
tests/unit/unit3205.c:565:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  565 |         expect = (const char *)memcpy(alt, "DHE-", 4);
      |                                ^~~~~~            ~~~
      |                                strcpy
tests/unit/unit3205.c:569:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  569 |         expect = (const char *)memcpy(alt + 4, "DHE-", 4) - 4;
      |                                ^~~~~~                ~~~
      |                                strcpy
```
Ref: https://github.com/curl/curl/actions/runs/22425366818/job/64932197466?pr=20725

Cherry-picked from curl#20725
@vszakats vszakats added the tests label Feb 26, 2026
@vszakats vszakats closed this in b1f853a Feb 26, 2026
@vszakats vszakats deleted the ctidyfp branch February 26, 2026 03:20
vszakats added a commit that referenced this pull request Feb 26, 2026
Also:
- imap-append: silence false positive (seen on Linux only).
  Follow-up to b1f853a #20731
  Follow-up to 725c560 #20723

Closes #20743
vszakats added a commit to vszakats/curl that referenced this pull request Mar 5, 2026
In favor or a small code change the silences the clang-tidy warning.

Follow-up to b1f853a curl#20731
@vszakats vszakats mentioned this pull request Mar 5, 2026
vszakats added a commit that referenced this pull request Mar 5, 2026
In favor or a small code change the silences the clang-tidy warning.

Follow-up to b1f853a #20731

Closes #20820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant