Skip to content
Unverified Commit d4dd3bd9 authored by Sam James's avatar Sam James
Browse files

settings: fix -Wlto-type-mismatch in NetworkManager::checkVersion decl

The actual definition of NetworkManager::checkVersion only ever returns
a bool and every consumer expects a bool. Fix the declaration to avoid
a -Wlto-type-mismatch warning and possible miscompilation with LTO:

```
src/settings/connectionsettings.cpp:57:12: error: type of ‘checkVersion’ does not match original declaration [-Werror=lto-type-mismatch]
   57 | extern int checkVersion(const int x, const int y, const int z);
      |            ^
src/manager.cpp:966:6: note: return value type mismatch
  966 | bool NetworkManager::checkVersion(const int x, const int y, const int z)
      |      ^
src/manager.cpp:966:6: note: type ‘bool’ should match type ‘int’
src/manager.cpp:966:6: note: ‘checkVersion’ was previously declared here
src/manager.cpp:966:6: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
```

Bug: https://bugs.gentoo.org/895580
parent 5cb41283
Pipeline #337854 passed with stage
in 3 minutes and 39 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment