mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
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:
committed by
Xiang Xiao
parent
41d0eaa892
commit
860bd3ad6f
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user