]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - stat.c
Don't allocate globals for constants that aren't read
[xonotic/gmqcc.git] / stat.c
diff --git a/stat.c b/stat.c
index bf92c98db416be3c7fec695c706d8a3aaecc13dd..544ae962b68c5263244c1a17cd97e8929aadeb59 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013, 2014
+ * Copyright (C) 2012, 2013, 2014, 2015
  *     Dale Weiler
  *     Wolfgang Bumiller
  *
@@ -141,7 +141,7 @@ void *stat_mem_allocate(size_t size, size_t line, const char *file, const char *
     info->expr = expr;
     info->prev = NULL;
     info->next = stat_mem_block_root;
-    
+
     /* Write identifier */
     memcpy(info + 1, IDENT_MEM, IDENT_SIZE);
 
@@ -167,7 +167,7 @@ void *stat_mem_allocate(size_t size, size_t line, const char *file, const char *
 void stat_mem_deallocate(void *ptr, size_t line, const char *file) {
     stat_mem_block_t *info  = NULL;
     char             *ident = (char *)ptr - IDENT_SIZE;
-    
+
     if (GMQCC_UNLIKELY(!ptr))
         return;
 
@@ -176,7 +176,7 @@ void stat_mem_deallocate(void *ptr, size_t line, const char *file) {
     if (!strcmp(ident, IDENT_VEC)) {
         vector_t         *vec   = (vector_t*)((char *)ptr - IDENT_VEC_TOP);
         stat_mem_block_t *block = (stat_mem_block_t*)((char *)vec - IDENT_MEM_TOP);
-        
+
         VALGRIND_MAKE_MEM_DEFINED(block, sizeof(stat_mem_block_t));
         con_err("internal warning: invalid use of mem_d:\n");
         con_err("internal warning:    vector (used elements: %u, allocated elements: %u)\n",