]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - stat.c
cleanup
[xonotic/gmqcc.git] / stat.c
diff --git a/stat.c b/stat.c
index a66bf37e8b0fe657e6ad28f0500203272c4a0a84..eedb0a41bec5261d0a5d471475e6603caf898e70 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -299,7 +299,7 @@ char *stat_mem_strdup(const char *src, size_t line, const char *file, bool empty
         return NULL;
 
     len = strlen(src);
-    if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, NULL))) {
+    if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, "strdup"))) {
         memcpy(ptr, src, len);
         ptr[len] = '\0';
     }
@@ -402,7 +402,7 @@ typedef struct hash_node_t {
  */
 #if 1
 #define GMQCC_ROTL32(X, R) (((X) << (R)) | ((X) >> (32 - (R))))
-GMQCC_INLINE size_t util_hthash(hash_table_t *ht, const char *key) {
+size_t util_hthash(hash_table_t *ht, const char *key) {
     const unsigned char *data   = (const unsigned char *)key;
     const size_t         len    = strlen(key);
     const size_t         block  = len / 4;
@@ -685,7 +685,7 @@ void util_htdel(hash_table_t *ht) {
  * information.
  */
 static void stat_dump_mem_contents(stat_mem_block_t *block, uint16_t cols) {
-    unsigned char *buffer = mem_a(cols);
+    unsigned char *buffer = (unsigned char *)mem_a(cols);
     unsigned char *memory = (unsigned char *)(block + 1);
     size_t         i;
 
@@ -721,7 +721,7 @@ static void stat_dump_mem_leaks(void) {
     for (info = stat_mem_block_root; info; info = info->next) {
         /* we need access to the block */
         VALGRIND_MAKE_MEM_DEFINED(info, sizeof(stat_mem_block_t));
-        con_out("lost: %u (bytes) at %s:%u %s\n",
+        con_out("lost: %u (bytes) at %s:%u from expression `%s`\n",
             info->size,
             info->file,
             info->line,