Fix all compiler warnings - #734
Conversation
|
Was this intended to fix warnings? Because when I compile I get this: Which looks like a PR I applied a few months ago (#534), only in reverse! |
|
@phkb hmm there were no warnings on Linux so I think Windows uses unsigned long long for NSUInteger while Linux uses unsigned long by the look of it. I wonder if there's a format specified that will work for both and why they use different types at all. |
wormhole warning was actually a bug
…e inconsistent between Windows and Linux
|
@phkb I have fixed all warnings on Windows and Linux. %zu instead of %lu or %llu works for NSUInteger. Also I replaced types like uint_fast32_t with uint32_t as the latter is consistent across platforms. |
|
(I attempted to rename my fork's master branch hoping the PR would stay open but it didn't so I renamed it back) |
|
@phkb I removed the unneeded cast you spotted and a couple of others. Please can you reapprove as I am not able to merge without approval (even though I can see no warnings on Windows in CI builds). |
../../src/Core/Entities/WormholeEntity.m:746:26: warning: implicit conversion from 'double' to 'NSUInteger' (aka 'unsigned long') changes value from 0.34 to 0 [-Wliteral-conversion]
746 | NSRange activity = { 0.34, 1.0 };
This one was actually a bug as 0.34 is rounded to 0!