Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 726a7d8

Browse files
committed
Ignore clang-analyzer-deadcode.DeadStores in BlobLibrary ctor
This is a dead store which we may want to eliminate. We do read from this field earlier in the constructor, and the offset should conceptually be incremented here, but it's never (currently) read after the conditional + memcpy earlier in the method. I'm assuming it may have been kept intentionally as potential future-proofing in case of future use of offset later in the method. This write can safely be removed with the current code though.
1 parent f5fea7c commit 726a7d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

impeller/blobcat/blob_library.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ BlobLibrary::BlobLibrary(std::shared_ptr<fml::Mapping> mapping)
4242
{
4343
const size_t read_size = sizeof(Blob) * header.blob_count;
4444
::memcpy(blobs.data(), mapping_->GetMapping() + offset, read_size);
45-
offset += read_size;
45+
offset += read_size; // NOLINT(clang-analyzer-deadcode.DeadStores)
4646
}
4747

4848
// Read the blobs.

0 commit comments

Comments
 (0)