Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15110 closed bug (fixed)

exit and _Exit are not marked noreturn

Reported by: icculus Owned by: waddlesplash
Priority: normal Milestone: R1/beta2
Component: System/libroot.so Version: R1/beta1
Keywords: Cc:
Blocked By: Blocking:
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 (3)

comment:1 by waddlesplash, 5 years ago

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

Resolution: fixed
Status: assignedclosed

Fixed in hrev53185.

comment:3 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.