[PATCH 5/5] Add abort(3) to the end of FatalError in case one of DDX functions fails to abort

Matt Turner mattst88 at gmail.com
Wed May 12 13:51:27 PDT 2010


On Wed, May 12, 2010 at 4:40 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, May 12, 2010 at 4:33 PM, Mikhail Gusarov
> <dottedmag at dottedmag.net> wrote:
>> Also it makes gcc happier.
>>
>> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
>> ---
>>  os/log.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/os/log.c b/os/log.c
>> index 0781659..a482616 100644
>> --- a/os/log.c
>> +++ b/os/log.c
>> @@ -545,6 +545,10 @@ FatalError(const char *f, ...)
>>        AbortServer();
>>     } else
>>        OsAbort();
>> +    /*
>> +     * OsVendorFatalError, AbortServer or OsAbort failed to abort.
>> +     */
>> +    abort();
>>     /*NOTREACHED*/
>>  }
>>
>> --
>> 1.7.1
>>
>> _______________________________________________
>> xorg-devel at lists.x.org: X.Org development
>> Archives: http://lists.x.org/archives/xorg-devel
>> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>>
>
> I think this would be a good place to use gcc-4.5's __builtin_unreachable.
>
> Matt
>

Actually, shouldn't we just mark AbortServer and OsAbort as
__attribute__((noreturn))?


More information about the xorg-devel mailing list