mesa: replace _mesa_problem() with unreachable() in pack.c
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 9 May 2017 02:50:56 +0000 (12:50 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 16 May 2017 02:25:50 +0000 (12:25 +1000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/pack.c

index 760c46afe74ea18d6ff740da9a082b0eb05b05b8..94a6d285d8ec14071b27ab03e7c8015704b0301e 100644 (file)
@@ -460,8 +460,7 @@ extract_uint_indexes(GLuint n, GLuint indexes[],
          break;
 
       default:
-         _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
-         return;
+         unreachable("bad srcType in extract_uint_indexes");
    }
 }
 
@@ -585,7 +584,7 @@ _mesa_unpack_stencil_span( struct gl_context *ctx, GLuint n,
             }
             break;
          default:
-            _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span");
+            unreachable("bad dstType in _mesa_unpack_stencil_span");
       }
 
       free(indexes);
@@ -732,7 +731,7 @@ _mesa_pack_stencil_span( struct gl_context *ctx, GLuint n,
       }
       break;
    default:
-      _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
+      unreachable("bad type in _mesa_pack_index_span");
    }
 
    free(stencil);
@@ -1123,8 +1122,7 @@ _mesa_pack_depth_span( struct gl_context *ctx, GLuint n, GLvoid *dest,
       }
       break;
    default:
-      _mesa_problem(ctx, "bad type in _mesa_pack_depth_span (%s)",
-                    _mesa_enum_to_string(dstType));
+      unreachable("bad type in _mesa_pack_depth_span()");
    }
 
    free(depthCopy);