0
0
mirror of https://github.com/linux-msm/rmtfs.git synced 2025-07-03 21:02:58 +00:00
Files
rmtfs/rmtfs.c
Javier Martinez Canillas cc5d4df973 rmtfs: Fix a couple of possible uninitialized variables usage
GCC version 13.2.1 20231205 complains about the following:

  cc -Wall -g -O2   -c -o storage.o storage.c
  In function ‘rmtfs_iovec’,
      inlined from ‘handle_rmtfs’ at rmtfs.c:403:4:
  rmtfs.c:224:12: warning: ‘is_write’ may be used uninitialized [-Wmaybe-uninitialized]
    224 |         if (is_write)
        |            ^
  rmtfs.c: In function ‘handle_rmtfs’:
  rmtfs.c:158:17: note: ‘is_write’ was declared here
    158 |         uint8_t is_write;
        |                 ^
  In function ‘rmtfs_iovec’,
      inlined from ‘handle_rmtfs’ at rmtfs.c:403:4:
  rmtfs.c:225:17: warning: ‘rmtfd’ may be used uninitialized [-Wmaybe-uninitialized]
    225 |                 storage_sync(rmtfd);
        |                 ^~~~~~~~~~~~~~~~~~~
  rmtfs.c: In function ‘handle_rmtfs’:
  rmtfs.c:154:23: note: ‘rmtfd’ was declared here
    154 |         struct rmtfd *rmtfd;
        |                       ^~~~~

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2024-02-07 15:03:20 +01:00

13 KiB