Opened 7 months ago

Closed 7 months ago

#15110 closed bug (fixed)

exit and _Exit are not marked noreturn

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


(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:

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

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 by waddlesplash, 7 months ago

Component: - GeneralSystem/
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 by waddlesplash, 7 months ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev53185.

Note: See TracTickets for help on using tickets.