From: Eric Blake Date: Thu, 8 Dec 2005 17:27:09 +0000 (+0000) Subject: * libltdl/libltdl/lt__alloc.h (FREE): Cast away constness of X-Git-Tag: release-2-1b~367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e895363ef9db7210d9481a1a297ca4c270c1799;p=thirdparty%2Flibtool.git * libltdl/libltdl/lt__alloc.h (FREE): Cast away constness of argument to `free' to avoid compiler warning. --- diff --git a/ChangeLog b/ChangeLog index 77d8bd55c..66ee8d010 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-08 Eric Blake + + * libltdl/libltdl/lt__alloc.h (FREE): Cast away constness of + argument to `free' to avoid compiler warning. + 2005-12-08 Peter O'Gorman * libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG, _LT_LINKER_SHLIBS) diff --git a/libltdl/libltdl/lt__alloc.h b/libltdl/libltdl/lt__alloc.h index 71c426d43..b5c615715 100644 --- a/libltdl/libltdl/lt__alloc.h +++ b/libltdl/libltdl/lt__alloc.h @@ -37,10 +37,10 @@ LT_BEGIN_C_DECLS #define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp)) #define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp)) #define FREE(mem) LT_STMT_START { \ - if (mem) (mem) = (free (mem), (void *) 0); } LT_STMT_END + if (mem) (mem) = (free ((void *)mem), (void *) 0); } LT_STMT_END #define MEMREASSIGN(p, q) LT_STMT_START { \ if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \ - } LT_STMT_END + } LT_STMT_END /* If set, this function is called when memory allocation has failed. */ LT_SCOPE void (*lt__alloc_die) (void);