]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
core: fix compiler warning due to difference in order of struct memebers 40872/head
authorWillem Jan Withagen <wjw@digiware.nl>
Thu, 15 Apr 2021 11:01:21 +0000 (13:01 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 15 Apr 2021 22:00:34 +0000 (00:00 +0200)
commitc4613f9c1bde288b43137738a7c0468e7a536840
tree8ade32f4037914b09be3832f1b353e2cd2745d9d
parent6710f28746268cc77e3be0e1228844b5764b2a88
core: fix compiler warning due to difference in order of struct memebers

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`

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/global/pidfile.cc