Skip to content

Commit

Permalink
pw_blob_store: Fixes bug in size reports
Browse files Browse the repository at this point in the history
This change silences warnings/errors due to incorrect use of
std::memset.

Change-Id: Ia58e7bec0c7c77594ff7908ce4fb55cf2845b11b
Signed-off-by: Nathaniel Brough <[email protected]>
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/91048
Commit-Queue: Ted Pudlik <[email protected]>
Pigweed-Auto-Submit: Armando Montanez <[email protected]>
Reviewed-by: Armando Montanez <[email protected]>
  • Loading branch information
nathaniel-brough authored and CQ Bot Account committed Apr 29, 2022
1 parent 6fff19d commit 1fb05bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pw_blob_store/size_report/base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main() {
PW_LOG_INFO("We care about optimizing: %d", *unoptimizable);

void* result =
std::memset((void*)working_buffer, sizeof(working_buffer), 0x55);
std::memset((void*)working_buffer, 0x55, sizeof(working_buffer));
is_set = (result != nullptr);

{
Expand Down
2 changes: 1 addition & 1 deletion pw_blob_store/size_report/basic_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main() {
PW_LOG_INFO("We care about optimizing: %d", *unoptimizable);

void* result =
std::memset((void*)working_buffer, sizeof(working_buffer), 0x55);
std::memset((void*)working_buffer, 0x55, sizeof(working_buffer));
is_set = (result != nullptr);

{
Expand Down
2 changes: 1 addition & 1 deletion pw_blob_store/size_report/deferred_write_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main() {
PW_LOG_INFO("We care about optimizing: %d", *unoptimizable);

void* result =
std::memset((void*)working_buffer, sizeof(working_buffer), 0x55);
std::memset((void*)working_buffer, 0x55, sizeof(working_buffer));
is_set = (result != nullptr);

{
Expand Down

0 comments on commit 1fb05bd

Please sign in to comment.