]> wimlib.net Git - wimlib/commitdiff
Don't bother with malloc function attribute
authorEric Biggers <ebiggers3@gmail.com>
Sun, 31 Jul 2022 02:03:42 +0000 (19:03 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 31 Jul 2022 02:03:42 +0000 (19:03 -0700)
include/wimlib/blob_table.h
include/wimlib/compiler.h
include/wimlib/paths.h
include/wimlib/util.h

index d16f5a243a99e5e5de8e63d6a72c1c289b70c4f8..952b6dd0c08253fea3042640d6267eda326fa9df 100644 (file)
@@ -266,7 +266,7 @@ struct blob_descriptor {
 };
 
 extern struct blob_table *
-new_blob_table(size_t capacity) _malloc_attribute;
+new_blob_table(size_t capacity);
 
 extern void
 free_blob_table(struct blob_table *table);
@@ -282,10 +282,10 @@ write_blob_table_from_blob_list(struct list_head *blob_list,
                                int write_resource_flags);
 
 extern struct blob_descriptor *
-new_blob_descriptor(void) _malloc_attribute;
+new_blob_descriptor(void);
 
 extern struct blob_descriptor *
-clone_blob_descriptor(const struct blob_descriptor *blob) _malloc_attribute;
+clone_blob_descriptor(const struct blob_descriptor *blob);
 
 extern void
 blob_decrement_refcnt(struct blob_descriptor *blob, struct blob_table *table);
index 1d596e20a37641b5ec9874f3875febf1d1a45438..91445b2a6ada21275e9648ff5c1cff79f7c248d0 100644 (file)
 #  define _cold_attribute
 #endif
 
-/* Hint that the annotated function is malloc-like: any non-null pointer it
- * returns will not alias any pointer previously in use by the program.  */
-#define _malloc_attribute      __attribute__((malloc))
-
 /* Hint that the annotated function takes a printf()-like format string and
  * arguments.  This is currently disabled on Windows because MinGW does not
  * support this attribute on functions taking wide-character strings.  */
index e6c331776d3825755415d55406f7c704f3de09f7..6ff7193e39173e77695c621fb38dc9c17deb837a 100644 (file)
@@ -17,7 +17,7 @@ extern void
 do_canonicalize_path(const tchar *in, tchar *out);
 
 extern tchar *
-canonicalize_wim_path(const tchar *wim_path) _malloc_attribute;
+canonicalize_wim_path(const tchar *wim_path);
 
 /* is_any_path_separator() - characters treated as path separators in WIM path
  * specifications and capture configuration files (the former will be translated
index 12b1b120a46ef0d1be9ee47e975ec1e928ced870..350fbbb592d521530b3e82518bf3f1fcfbfb9b1b 100644 (file)
@@ -43,7 +43,7 @@
  *******************/
 
 extern void *
-wimlib_malloc(size_t size) _malloc_attribute;
+wimlib_malloc(size_t size);
 
 extern void
 wimlib_free_memory(void *p);
@@ -52,24 +52,24 @@ extern void *
 wimlib_realloc(void *ptr, size_t size);
 
 extern void *
-wimlib_calloc(size_t nmemb, size_t size) _malloc_attribute;
+wimlib_calloc(size_t nmemb, size_t size);
 
 extern char *
-wimlib_strdup(const char *str) _malloc_attribute;
+wimlib_strdup(const char *str);
 
 #ifdef __WIN32__
 extern wchar_t *
-wimlib_wcsdup(const wchar_t *str) _malloc_attribute;
+wimlib_wcsdup(const wchar_t *str);
 #endif
 
 extern void *
-wimlib_aligned_malloc(size_t size, size_t alignment) _malloc_attribute;
+wimlib_aligned_malloc(size_t size, size_t alignment);
 
 extern void
 wimlib_aligned_free(void *ptr);
 
 extern void *
-memdup(const void *mem, size_t size) _malloc_attribute;
+memdup(const void *mem, size_t size);
 
 #define MALLOC         wimlib_malloc
 #define FREE           wimlib_free_memory