Files
Alberto Escolar Piedras 139b7c20c2 drivers: xen: Fix uninitialized variable warning
gcc complains about the posibility of ret and gfn being used
unitialiazed (with the input npages == 0).
Let's fix it by initializing ret to 0.

The warnings being:
```
      zephyr/CMakeFiles/zephyr.dir/drivers/xen/gnttab.c.obj
In file included from include/zephyr/logging/log.h:11,
                 from drivers/xen/gnttab.c:31:
include/zephyr/logging/log_core.h: In function 'gnttab_get_pages':
include/zephyr/logging/log_core.h:221:9: warning: 'gfn' may be used
uninitialized [-Wmaybe-uninitialized]
  221 |         z_log_minimal_printk("%c: " fmt "\n", \
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:202:19: note: 'gfn' was declared here
  202 |         xen_pfn_t gfn;
      |                   ^~~
include/zephyr/logging/log_core.h:221:9: warning: 'ret' may be used
uninitialized [-Wmaybe-uninitialized]
  221 |         z_log_minimal_printk("%c: " fmt "\n", \
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/xen/gnttab.c:199:13: note: 'ret' was declared here
  199 |         int ret;
      |             ^~~
```

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 17:04:05 +01:00
..