XRT icon indicating copy to clipboard operation
XRT copied to clipboard

Compilation warning error with g++ 11.2 `src/runtime_src/core/pcie/emulation/cpu_em/generic_pcie_hal2/shim.cxx`

Open keryell opened this issue 2 years ago • 1 comments

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

keryell avatar Apr 29 '22 01:04 keryell

@uday610 Looks like we can close this one.

bryanloz-xilinx avatar Jun 21 '22 06:06 bryanloz-xilinx