master - gcc: remove warns about free of const
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c3642957c5427d69b6aac45d2d1088786967cabd Commit: c3642957c5427d69b6aac45d2d1088786967cabd Parent: 0eb9daf602281d233c83e5823b3c6297fb541deb Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Feb 13 19:53:07 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Feb 13 19:56:02 2018 +0100
gcc: remove warns about free of const
--- lib/mirror/mirrored.c | 2 +- lib/raid/raid.c | 6 +++--- lib/snapshot/snapshot.c | 2 +- lib/thin/thin.c | 2 +- lib/unknown/unknown.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)
lib/mirror/mirrored.c +1 -1
@@ -531,7 +531,7 @@ static int _mirrored_modules_needed(struct dm_pool *mem,static void _mirrored_destroy (struct segment_type *segtype) { -dm_free (segtype->dso); +dm_free ((void *) segtype->dso);dm_free (segtype); }
lib/raid/raid.c +3 -3
@@ -363,8 +363,8 @@ static int _raid_target_status_compatible(const char *type)static void _raid_destroy (struct segment_type *segtype) { -dm_free (segtype->dso); -dm_free ((void *) segtype); +dm_free ((void *) segtype->dso); +dm_free (segtype); }#ifdef DEVMAPPER_SUPPORT
@@ -652,7 +652,7 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl#endif {struct segment_type *segtype; -const char *dso =NULL ; +char *dso =NULL ;unsigned i;uint64_t monitored =0 ;
lib/snapshot/snapshot.c +1 -1
@@ -224,7 +224,7 @@ static int _snap_modules_needed(struct dm_pool *mem,static void _snap_destroy (struct segment_type *segtype) { -dm_free (segtype->dso); +dm_free ((void *) segtype->dso);dm_free (segtype); }
lib/thin/thin.c +1 -1
@@ -745,7 +745,7 @@ static int _thin_target_present(struct cmd_context *cmd,static void _thin_destroy (struct segment_type *segtype) { -dm_free (segtype->dso); +dm_free ((void *) segtype->dso);dm_free (segtype); }
lib/unknown/unknown.c +1 -1
@@ -49,7 +49,7 @@ static int _unknown_text_export(const struct lv_segment *seg, struct formatter *static void _unknown_destroy (struct segment_type *segtype) { -dm_free (segtype->name); +dm_free ((void *) segtype->name);dm_free (segtype); }