From: José Fonseca Date: Tue, 24 Jun 2008 01:56:36 +0000 (+0900) Subject: mesa: Replace abort by asserts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c921a29b3a696f6fa99b648d6cd975dbcf106429;p=mesa.git mesa: Replace abort by asserts. --- diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index b8e9d5f59b8..ad2a63584b7 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -144,19 +144,19 @@ typedef unsigned int _glthread_Cond; // #warning Condition variables not implemented. #define _glthread_INIT_COND(cond) \ - abort(); + ASSERT(0); #define _glthread_DESTROY_COND(name) \ - abort(); + ASSERT(0); #define _glthread_COND_WAIT(cond, mutex) \ - abort(); + ASSERT(0); #define _glthread_COND_SIGNAL(cond) \ - abort(); + ASSERT(0); #define _glthread_COND_BROADCAST(cond) \ - abort(); + ASSERT(0); #endif diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index 2af837cf64b..0b07b4fd68d 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -206,7 +206,8 @@ static int test_transform_function( transform_func func, int psize, case VAR: break; default: - abort(); + ASSERT(0); + return 0; } } } diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 9abd0b3531d..1e182eef1c5 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -67,7 +67,7 @@ gl_wrap_to_sp(GLenum wrap) case GL_MIRROR_CLAMP_TO_BORDER_EXT: return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER; default: - abort(); + assert(0); return 0; } } diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index a8b6faad1c2..150545dfadc 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -772,7 +772,8 @@ tgsi_translate_mesa_program( TGSI_WRITEMASK_XYZW ); break; default: - abort(); + assert(0); + return 0; } ti += tgsi_build_full_declaration(&fulldecl, &tokens[ti],