mesa: Replace abort by asserts.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 24 Jun 2008 01:56:36 +0000 (10:56 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 24 Jun 2008 02:00:01 +0000 (11:00 +0900)
src/mesa/glapi/glthread.h
src/mesa/math/m_debug_xform.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_mesa_to_tgsi.c

index b8e9d5f59b8c3b20a6a334c2f409eb720db8c575..ad2a63584b7feea64b5981c7743fc53ca25c2f0d 100644 (file)
@@ -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
 
index 2af837cf64bbe8dde6a5e272f0e7ff0f6f5a89cd..0b07b4fd68d8a30844ef817051a23b3cd25be2ff 100644 (file)
@@ -206,7 +206,8 @@ static int test_transform_function( transform_func func, int psize,
          case VAR:
             break;
          default:
-            abort();
+            ASSERT(0);
+            return 0;
          }
       }
    }
index 9abd0b3531d90d8b71b0fa263d3569e62d929121..1e182eef1c54168c7c692d560cbf83ece5090e03 100644 (file)
@@ -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;
    }
 }
index a8b6faad1c2ba2bfca9bf483eb0bd27495a625d8..150545dfadcf917bc9a382ec6d092887467e7319 100644 (file)
@@ -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],