Skip to content
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

Remove unused variables to fix clang compilation errors #7

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions cdecrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ static bool extract_file_hash(FILE* src, uint64_t part_data_offset, uint64_t fil
uint8_t h0[SHA_DIGEST_LENGTH];
uint8_t hashes[HASHES_SIZE];

uint64_t written = 0;
uint64_t write_size = HASH_BLOCK_SIZE;
uint64_t block_number = (file_offset / HASH_BLOCK_SIZE) & 0x0F;

Expand Down Expand Up @@ -270,8 +269,6 @@ static bool extract_file_hash(FILE* src, uint64_t part_data_offset, uint64_t fil

size -= fwrite(dec + soffset, sizeof(char), (size_t)write_size, dst);

written += write_size;

block_number++;
if (block_number >= 16)
block_number = 0;
Expand Down Expand Up @@ -301,7 +298,6 @@ static bool extract_file(FILE* src, uint64_t part_data_offset, uint64_t file_off
uint8_t* dec = malloc(BLOCK_SIZE);
assert(enc != NULL);
assert(dec != NULL);
uint64_t written = 0;

// Calc real offset
uint64_t roffset = file_offset / BLOCK_SIZE * BLOCK_SIZE;
Expand Down Expand Up @@ -336,8 +332,6 @@ static bool extract_file(FILE* src, uint64_t part_data_offset, uint64_t file_off

size -= fwrite(dec + soffset, sizeof(char), (size_t)write_size, dst);

written += write_size;

if (soffset) {
write_size = BLOCK_SIZE;
soffset = 0;
Expand Down