Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am on MinGW GCC 13.2 So with -Wpedantic you'll see a bunch of warning pops up in ENet. It involved the mixing of two separate enums with their | operations. We resolve this by using (int) which should generate absolutely no extra codes and remove the annoying messages.
There was also a mismatch of types in one of the printf when using ENET_DEBUG. So I corrected that at line: 3185-92
Finally the use of ENET_ATOMIC_CAS in enet_get_time() with the implementation of line 1222-28 ISO forbid the use of ({...)} but here where it's implemented it only occurs for GCC which make the expression safe and valid. To ignore such message we would have to use at line: 5101
#if defined(GNUC) // Ignore invalid warning.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif
uint64_t old_value = ENET_ATOMIC_CAS(&start_time_ns, 0, want_value);
#if defined(GNUC)
#pragma GCC diagnostic pop
#endif