Opened 8 days ago

Closed 5 days ago

#15110 closed bug (fixed)

exit and _Exit are not marked noreturn

Reported by: icculus Owned by: waddlesplash
Priority: normal Milestone: Unscheduled
Component: System/libroot.so Version: R1/beta1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

(I can't find this file surfing around the git web interface, so I'm not sure if this was changed recently, but my About Haiku dialog says I'm on R1/beta1 revision hrev52295+129, fwiw.)

In /boot/system/sources/haiku/headers/posix/stdlib.h, there's a declaration for exit() and _Exit()--capital E--and it doesn't have an attribute((noreturn)) on it.

In the same header, _exit()--lowercase e--does have this attribute.

This causes a minor problem in SDL, since we have this code:

https://hg.libsdl.org/SDL/file/a9a7c1e48f0b/src/SDL_assert.c#l123

Which generates this warning when built on Haiku (I presume it selected the _Exit() codepath)...

https://buildbot.libsdl.org/builders/sdl-haiku/builds/3683/steps/compile/logs/warnings%20%281%29

I'm putting in an #ifdef that will make Haiku builds prefer _exit() for now, and this isn't the end of the world in any case, but can someone add that attribute to the headers?

Thanks, --ryan.

Change History (2)

comment:1 Changed 8 days ago by waddlesplash

Component: - GeneralSystem/libroot.so
Owner: changed from nobody to waddlesplash
Status: newassigned

Sure. We fixed a few more of these since beta1, but it appears that one got missed. Will fix.

comment:2 Changed 5 days ago by waddlesplash

Resolution: fixed
Status: assignedclosed

Fixed in hrev53185.

Note: See TracTickets for help on using tickets.