Skip to content

src: remove void* -> char* -> void* casts #57791

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

tniessen
Copy link
Member

@tniessen tniessen commented Apr 8, 2025

When passing the return value of BackingStore::Data() as the first or second argument to memcpy(), it is unnecessary to cast the returned pointer to char*.

Refs: #52292

When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: nodejs#52292
@tniessen tniessen added the c++ Issues and PRs that require attention from people who are familiar with C++. label Apr 8, 2025
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 8, 2025
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.22%. Comparing base (b85505d) to head (f282307).
Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
src/node_buffer.cc 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57791      +/-   ##
==========================================
- Coverage   90.24%   90.22%   -0.03%     
==========================================
  Files         630      630              
  Lines      185198   185272      +74     
  Branches    36295    36340      +45     
==========================================
+ Hits       167140   167165      +25     
- Misses      10987    11016      +29     
- Partials     7071     7091      +20     
Files with missing lines Coverage Δ
src/crypto/crypto_cipher.cc 72.18% <100.00%> (-0.28%) ⬇️
src/crypto/crypto_sig.cc 70.84% <100.00%> (-0.13%) ⬇️
src/node_http2.cc 83.51% <100.00%> (-1.38%) ⬇️
src/stream_base.cc 80.25% <100.00%> (-0.08%) ⬇️
src/udp_wrap.cc 78.62% <100.00%> (-0.09%) ⬇️
src/node_buffer.cc 67.30% <0.00%> (-0.17%) ⬇️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@tniessen tniessen added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 8, 2025
@nodejs-github-bot

This comment was marked as outdated.

@tniessen tniessen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 8, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 9, 2025
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 10, 2025
@nodejs-github-bot nodejs-github-bot merged commit 8dce721 into nodejs:main Apr 10, 2025
80 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 8dce721

JonasBa pushed a commit to JonasBa/node that referenced this pull request Apr 11, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: nodejs#52292
PR-URL: nodejs#57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 6, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
RafaelGSS pushed a commit that referenced this pull request May 14, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 16, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 17, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 17, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 17, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 18, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
aduh95 pushed a commit that referenced this pull request May 19, 2025
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: #52292
PR-URL: #57791
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants