ngs icon indicating copy to clipboard operation
ngs copied to clipboard

malloc.c:71:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]

Open ryandesign opened this issue 1 year ago • 2 comments

Building ngs 0.2.16 I see this warning:

malloc.c:71:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.

ryandesign avatar Jun 18 '24 00:06 ryandesign

Which platform and compiler?

One of the control paths in ngs_realloc() ends with assert(0 == "Realloc not implemented for NGS_STD_MALLOC_AFTER_FORK"). I can try to fix the warning when I'll be able to reproduce it. I don't see this issue on my machine and several outputs of GH actions that I looked at.

ilyash-b avatar Jun 18 '24 05:06 ilyash-b

macOS, clang

ryandesign avatar Jun 18 '24 06:06 ryandesign

I think we can ignore this. Apple clang version 15.0.0 (clang-1500.3.9.4) knows how to handle this. I can reproduce the issue when I comment out the assert() that always fails. It seems that version 15 is smart enough to figure this out and you are using some earlier version that doesn't. Closing. If you consider this issue to be critical, please reopen.

ilyash-b avatar Jul 12 '24 02:07 ilyash-b