Skip to content

[Support/BLAKE3] Remove some dead stores #95120

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
Jun 13, 2024
Merged

Conversation

tstellar
Copy link
Collaborator

These were caught by the clang static analyzer.

These were caught by the clang static analyzer.
@tstellar tstellar requested a review from akyrtzi June 11, 2024 14:03
@llvmbot
Copy link
Member

llvmbot commented Jun 11, 2024

@llvm/pr-subscribers-llvm-support

Author: Tom Stellard (tstellar)

Changes

These were caught by the clang static analyzer.


Full diff: https://github.com/llvm/llvm-project/pull/95120.diff

1 Files Affected:

  • (modified) llvm/lib/Support/BLAKE3/blake3.c (+1-3)
diff --git a/llvm/lib/Support/BLAKE3/blake3.c b/llvm/lib/Support/BLAKE3/blake3.c
index a369452a3e759..23f0252602de2 100644
--- a/llvm/lib/Support/BLAKE3/blake3.c
+++ b/llvm/lib/Support/BLAKE3/blake3.c
@@ -141,9 +141,7 @@ INLINE void chunk_state_update(blake3_chunk_state *self, const uint8_t *input,
     input_len -= BLAKE3_BLOCK_LEN;
   }
 
-  size_t take = chunk_state_fill_buf(self, input, input_len);
-  input += take;
-  input_len -= take;
+  chunk_state_fill_buf(self, input, input_len);
 }
 
 INLINE output_t chunk_state_output(const blake3_chunk_state *self) {

@akyrtzi
Copy link
Contributor

akyrtzi commented Jun 11, 2024

I'd like that we keep the changes with upstream BLAKE3 to a minimum, could you open a PR against https://github.com/BLAKE3-team/BLAKE3? Don't merge this until the BLAKE3 upstream PR is accepted and merged.

@tstellar
Copy link
Collaborator Author

PR for upstream: BLAKE3-team/BLAKE3#398

@tstellar tstellar merged commit 58df646 into llvm:main Jun 13, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants