Conversation
... and use this type instead of 'sa_family_t' in the code since several platforms don't have it.
|
Thank you! |
|
Now I get: We aren't annotating parameters as nonnull, are we? |
No... it rather makes me suspect it uses the assert() above as a hint, but I'm a bit puzzled. This function really is not possible to call with a NULL pointer in the current code, I checked all the current call paths. |
|
btw, which compiler (version) gives you that warning? |
|
This is MinGW-w64's GCC 7.3: |
|
Interestingly, I don't get that error with gcc 7.3.0 on Linux (7.3.0-15 on debian). |
|
@MarcelRaad: does the warning go away if you remove the assert? Or do you need to add a "real" check for NULL there to make it go away? |
|
Yes, removing the assert makes the warning go away! And there's also one in |
|
Ah, will you land removals of those asserts then? I don't think those are terribly valuable anyway since if we do get NULL pointers there we will crash/trigger valgrind reports etc. |
|
OK, will do! |
In debug mode, MingGW-w64's GCC 7.3 issues null-dereference warnings when dereferencing pointers after DEBUGASSERT-ing that they are not NULL. Fix this by removing the DEBUGASSERTs. Suggested-by: Daniel Stenberg Ref: #2463
Continued work on @cooljeanius' take from #2307 with my added polish to make sure they build fine all over.