Skip to content

cleanup: Don't use memcpy to cast arbitrary structs to uint8_t[].#2684

Merged
toktok-releaser merged 1 commit into
TokTok:masterfrom
iphydf:no-struct-bytes-cast
Feb 13, 2024
Merged

cleanup: Don't use memcpy to cast arbitrary structs to uint8_t[].#2684
toktok-releaser merged 1 commit into
TokTok:masterfrom
iphydf:no-struct-bytes-cast

Conversation

@iphydf
Copy link
Copy Markdown
Member

@iphydf iphydf commented Feb 12, 2024

We can memcpy integral types and array types. There's no need to directly memcpy into or from struct types.


This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Feb 12, 2024
@iphydf iphydf marked this pull request as ready for review February 12, 2024 10:48
We can memcpy integral types and array types. There's no need to
directly memcpy into or from struct types.
@iphydf iphydf force-pushed the no-struct-bytes-cast branch from c18eb8e to 623e3ee Compare February 12, 2024 10:56
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c71567d) 72.94% compared to head (623e3ee) 73.11%.

Files Patch % Lines
toxcore/network.c 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2684      +/-   ##
==========================================
+ Coverage   72.94%   73.11%   +0.17%     
==========================================
  Files         148      148              
  Lines       30486    30486              
==========================================
+ Hits        22238    22291      +53     
+ Misses       8248     8195      -53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Green-Sky
Copy link
Copy Markdown
Member

I thought we ran autotests on ipv6 too?

@iphydf
Copy link
Copy Markdown
Member Author

iphydf commented Feb 12, 2024

I thought we ran autotests on ipv6 too?

I'm not sure we run those on CI. Why are you asking?

@nurupo
Copy link
Copy Markdown
Member

nurupo commented Feb 13, 2024

Maybe this warning has something to do with it

image

@toktok-releaser toktok-releaser merged commit 623e3ee into TokTok:master Feb 13, 2024
@iphydf iphydf deleted the no-struct-bytes-cast branch February 13, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants