It's not the most elegant of the fixes but properly fixing this requires
rewriting the function.
vpd.c: In function 'pci_read_vpd_dword_gw':
vpd.c:223:31: error: 'sizeof' on array function parameter 'data' will return size of 'unsigned char *' [-Werror=sizeof-array-argument]
ret = pread(fd, data, sizeof data, vpd_cap_offset + VPD_DATA_OFFSET);
^
vpd.c:189:86: note: declared here
int pci_read_vpd_dword_gw(int fd, int vpd_cap_offset, unsigned offset, unsigned char data[4])
^
vpd.c:224:20: error: 'sizeof' on array function parameter 'data' will return size of 'unsigned char *' [-Werror=sizeof-array-argument]
if (ret != sizeof data) {
^
vpd.c:189:86: note: declared here
int pci_read_vpd_dword_gw(int fd, int vpd_cap_offset, unsigned offset, unsigned char data[4])
Signed-off-by: Ana Guerrero López <ana@ekaia.org> Signed-off-by: Adrian Chiris <adrianc@mellanox.com>