XRT
XRT copied to clipboard
Compilation warning error with g++ 11.2 `src/runtime_src/core/pcie/emulation/cpu_em/generic_pcie_hal2/shim.cxx`
Compilation error with g++ 11.2
/var/tmp/rkeryell/SYCL/XRT/src/runtime_src/core/pcie/emulation/cpu_em/generic_pcie_hal2/shim.cxx: In member function ‘int xclcpuemhal2::CpuemShim::xclRegRW(bool, uint32_t, uint32_t, uint32_t*)’:
/var/tmp/rkeryell/SYCL/XRT/src/runtime_src/core/pcie/emulation/cpu_em/generic_pcie_hal2/shim.cxx:983:14: error: ‘*(unsigned int*)((char*)&buff + offsetof(std::array<char, 4>,std::array<char, 4>::_M_elems[0]))’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
983 | *datap = tmp_buff[0];
| ~~~~~~~^~~~~~~~~~~~~
Honestly, considering the state of this code, compiling with -Werror
is challenging...
So for now I am using the shortcut from https://github.com/Xilinx/XRT/issues/6640#issuecomment-1112659501
@uday610 Looks like we can close this one.