drivers/pci_qemu_test.c: fix compiler warning

pci/pci_qemu_test.c:218:6: warning: ‘ops’ may be used uninitialized [-Wmaybe-uninitialized]
  218 |   ops->write(dev->bus, &hdr->test, num, sizeof(num));
      |   ~~~^~~~~~~
pci/pci_qemu_test.c: In function ‘pci_qemu_test_probe’:
pci/pci_qemu_test.c:286:41: note: ‘ops’ was declared here
  286 |   FAR const struct pci_qemu_test_ops_s *ops;
      |

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-04-27 08:53:15 +02:00 committed by Xiang Xiao
parent 41d0eaa892
commit 860bd3ad6f
1 changed files with 4 additions and 0 deletions

View File

@ -319,6 +319,10 @@ static int pci_qemu_test_probe(FAR struct pci_device_s *dev)
{
ops = &g_pci_qemu_test_io_ops;
}
else
{
PANIC();
}
for (test_cnt = 0; test_cnt < 0xff; test_cnt++)
{