#
d26fa3e7 |
| 21-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issue
openpower-pels: clean up various compile warnings
Compile warnings observed when compiling parts of the openpower-pels (or corresponding tests) under stricter compiler warning flags of Meson.
Issues fixed: - many unused parameters - invalid case fall-through - excess semi-colons - incorrect 'const' on return-by-value type - removal of variable length array in test case - uncaught return from 'system' call in test case
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8af69184042cf8661d1307a02ecf3afcab4724a1
show more ...
|
#
d377793c |
| 24-Sep-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add Stream ops for std::vector<uint8_t>
Add << and >> operators to the Stream class for use with a std::vector<uint8_t>.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9656ee4e34
PEL: Add Stream ops for std::vector<uint8_t>
Add << and >> operators to the Stream class for use with a std::vector<uint8_t>.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I9656ee4e34840d311148e6a701131b3420e62d25
show more ...
|
#
113ad28c |
| 09-Jul-2019 |
Matt Spinler <spinler@us.ibm.com> |
PEL: Add Stream class to manipulate PEL data
This stream inserts data into and extracts data from the vector<uint8_t> that it is given in its contructor. That vector is how PEL data is stored. Thi
PEL: Add Stream class to manipulate PEL data
This stream inserts data into and extracts data from the vector<uint8_t> that it is given in its contructor. That vector is how PEL data is stored. This object takes care of the endian conversion for fields that require it, as PEL data is big endian.
On writes, it will expand the vector if necessary.
An exception will be thrown an invalid access is attempted, such as trying to extract a value when at the end of the data.
It provides >> and << operators for common data types, as well as read()/write() functions when using other types.
Example:
std::vector<uint8_t> data; Stream stream{data};
uin32_t value = 0x12345678; stream << value;
stream.offset(0);
uint32_t newValue; stream >> newValue;
assert(value == newValue);
uint8_t buf[3000] = {0}; stream.write(buf, 3000);
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I8dc5566371749b45a260389a564836433323eef8
show more ...
|