Change all debug_assert calls to assert
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Emma Anholt <emma@anholt.net> Acked-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17403>
This commit is contained in:
+11
-11
@@ -175,7 +175,7 @@ debug_free(const char *file, unsigned line, const char *function,
|
||||
debug_printf("%s:%u:%s: freeing bad or corrupted memory %p\n",
|
||||
file, line, function,
|
||||
ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ debug_free(const char *file, unsigned line, const char *function,
|
||||
debug_printf("%s:%u:%s: buffer overflow %p\n",
|
||||
hdr->file, hdr->line, hdr->function,
|
||||
ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
#if DEBUG_FREED_MEMORY
|
||||
@@ -239,7 +239,7 @@ debug_realloc(const char *file, unsigned line, const char *function,
|
||||
debug_printf("%s:%u:%s: reallocating bad or corrupted memory %p\n",
|
||||
file, line, function,
|
||||
old_ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ debug_realloc(const char *file, unsigned line, const char *function,
|
||||
debug_printf("%s:%u:%s: buffer overflow %p\n",
|
||||
old_hdr->file, old_hdr->line, old_hdr->function,
|
||||
old_ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* alloc new */
|
||||
@@ -318,7 +318,7 @@ debug_memory_end(unsigned long start_no)
|
||||
debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
|
||||
hdr->file, hdr->line, hdr->function,
|
||||
ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if ((start_no <= hdr->no && hdr->no < last_no) ||
|
||||
@@ -336,7 +336,7 @@ debug_memory_end(unsigned long start_no)
|
||||
debug_printf("%s:%u:%s: buffer overflow %p\n",
|
||||
hdr->file, hdr->line, hdr->function,
|
||||
ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ debug_memory_tag(void *ptr, unsigned tag)
|
||||
hdr = header_from_data(ptr);
|
||||
if (hdr->magic != DEBUG_MEMORY_MAGIC) {
|
||||
debug_printf("%s corrupted memory at %p\n", __FUNCTION__, ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
hdr->tag = tag;
|
||||
@@ -390,13 +390,13 @@ debug_memory_check_block(void *ptr)
|
||||
if (hdr->magic != DEBUG_MEMORY_MAGIC) {
|
||||
debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
|
||||
hdr->file, hdr->line, hdr->function, ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if (ftr->magic != DEBUG_MEMORY_MAGIC) {
|
||||
debug_printf("%s:%u:%s: buffer overflow %p\n",
|
||||
hdr->file, hdr->line, hdr->function, ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,13 +424,13 @@ debug_memory_check(void)
|
||||
if (hdr->magic != DEBUG_MEMORY_MAGIC) {
|
||||
debug_printf("%s:%u:%s: bad or corrupted memory %p\n",
|
||||
hdr->file, hdr->line, hdr->function, ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
if (ftr->magic != DEBUG_MEMORY_MAGIC) {
|
||||
debug_printf("%s:%u:%s: buffer overflow %p\n",
|
||||
hdr->file, hdr->line, hdr->function, ptr);
|
||||
debug_assert(0);
|
||||
assert(0);
|
||||
}
|
||||
|
||||
#if DEBUG_FREED_MEMORY
|
||||
|
||||
Reference in New Issue
Block a user