Skip to content

Fix #1219 copy on expect with output parameter returning #1222

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change type of membuf_ to char* to support pre-C99 compilers.
  • Loading branch information
asgeroverby committed Jun 6, 2019
commit 0bfcb8b7f80e4e6def5873e68405a0cfa5848de2
2 changes: 1 addition & 1 deletion include/CppUTestExt/MockNamedValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class MockNamedValue
void* objectPointerValue_;
const void* outputPointerValue_;
} value_;
uint8_t* membuf_;
char * membuf_;
size_t size_;
MockNamedValueComparator* comparator_;
MockNamedValueCopier* copier_;
Expand Down
2 changes: 1 addition & 1 deletion src/CppUTestExt/MockNamedValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void MockNamedValue::copyValue(const void* value, size_t size)
{
type_ = "const void*";
if (membuf_ == NULL) {
membuf_ = new uint8_t[size];
membuf_ = new char[size];
}
memcpy(membuf_, value, size);
value_.constPointerValue_ = (const void*) membuf_;
Expand Down