• Eric Pouech's avatar
    rpcrt4: Fix GCC12.2 warnings. · 7ffcd660
    Eric Pouech authored
    GCC12.2 warns about dereferencing a pointer to RpcPktHdr
    while it has been allocated to the size of one of the packet
    (hence smaller in some cases).
    
    /home/eric/work/wine/dlls/rpcrt4/rpc_message.c:111:26: warning: array subscript 'RpcPktHdr[0]' is partly outside array bounds of 'unsigned char[24]' [-Warray-bounds]
      111 |   Header->common.rpc_ver = RPC_VER_MAJOR;
    
    This patch fixes the warnings by accessing the created object
    through a pointer to their type (and not through the union).
    Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    7ffcd660
rpc_message.c 60.8 KB