Skip to content

Conversation

@cjp256
Copy link
Contributor

@cjp256 cjp256 commented Jul 25, 2017

Fixes error compiling:

/home/chris/git/hypervisor/bfelf_loader/test/test_loader_relocate.cpp: In member function ‘void bfelf_loader_ut::test_bfelf_loader_relocate_uninitialized_files()’:
/home/chris/git/hypervisor/bfelf_loader/test/test_loader_relocate.cpp:56:63: error: no match for ‘operator=’ (operand types are ‘std::shared_ptr’ and ‘std::remove_reference<std::unique_ptr<char []>&>::type {aka std::unique_ptr<char []>}’)
m_dummy_misc_exec = std::move(std::get<0>(dummy_misc_pair));
...

Convert m_dummy_misc_exec and m_dummy_code_exec from:

  • shared_ptr to unique_ptr
  • from char to char[].

On a side note, how is this not caught by automated CI build/test?

Signed-off-by: Chris Patterson pattersonc@ainfosec.com

Fixes error compiling:

/home/chris/git/hypervisor/bfelf_loader/test/test_loader_relocate.cpp: In member function ‘void bfelf_loader_ut::test_bfelf_loader_relocate_uninitialized_files()’:
/home/chris/git/hypervisor/bfelf_loader/test/test_loader_relocate.cpp:56:63: error: no match for ‘operator=’ (operand types are ‘std::shared_ptr<char>’ and ‘std::remove_reference<std::unique_ptr<char []>&>::type {aka std::unique_ptr<char []>}’)
     m_dummy_misc_exec = std::move(std::get<0>(dummy_misc_pair));
...

Convert m_dummy_misc_exec and m_dummy_code_exec from:
- shared_ptr to unique_ptr
- from char to char[].

On a side note, how is this not caught by automated CI build/test?

Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
@cjp256
Copy link
Contributor Author

cjp256 commented Jul 25, 2017

Thanks to @brendank310 for pointing out the fix.

@rianquinn rianquinn merged commit 2ca80ac into Bareflank:master Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants