]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
blk/kernel: explicit assign to fields in struct 40864/head
authorWillem Jan Withagen <wjw@digiware.nl>
Thu, 15 Apr 2021 10:53:50 +0000 (12:53 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 9 May 2021 10:36:53 +0000 (12:36 +0200)
commite9ecc9081afd910a31f1dc58d1f2ba86afebc9fa
tree6891f3dc0e9a74db22a287c0f24c3e3b19990359
parent44117ce5bdb8a1f5b3bbcb6a4a9a0810a93fe599
blk/kernel: explicit assign to fields in struct

Clang on FreeBSD reports:
```
Building CXX object src/global/CMakeFiles/libglobal_objs.dir/pidfile.cc.o
../src/global/pidfile.cc:170:5: warning: ISO C++ requires field designators to be specified in declaration order; field 'l_whence' will be initialized after field 'l_start' [-Wreorder-init-list]
    .l_start = 0,
    ^~~~~~~~~~~~
../src/global/pidfile.cc:169:17: note: previous initialization for field 'l_whence' is here
    .l_whence = SEEK_SET,
                ^~~~~~~~
```
And Linux and BSD have different orders in their `struct flock`.
It also prevents the wrong initialisation on FreeBSD

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/blk/kernel/KernelDevice.cc