From 0e0943c15b173015c3ff9475085bd064204f9c74 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 21 Sep 2016 08:22:35 +0200 Subject: debug: use const void * for ul_debugobj() We don't modify data it's pointing out and we should not modify it. Also remove casting to void * as gcc will do it automatically (before we had to cast it explicitly to avoid warning on discarding 'const' qualifier). Signed-off-by: Igor Gnatenko --- libfdisk/src/parttype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libfdisk') diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c index 8c36fdf3b..d894cf90d 100644 --- a/libfdisk/src/parttype.c +++ b/libfdisk/src/parttype.c @@ -310,7 +310,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype( if (!lb->nparttypes) return NULL; - DBG(LABEL, ul_debugobj((void *) lb, "parsing '%s' (%s) partition type", + DBG(LABEL, ul_debugobj(lb, "parsing '%s' (%s) partition type", str, lb->name)); types = lb->parttypes; @@ -321,7 +321,7 @@ struct fdisk_parttype *fdisk_label_parse_parttype( code = strtol(str, &end, 16); if (errno || *end != '\0') { - DBG(LABEL, ul_debugobj((void *) lb, "parsing failed: %m")); + DBG(LABEL, ul_debugobj(lb, "parsing failed: %m")); return NULL; } ret = fdisk_label_get_parttype_from_code(lb, code); -- cgit v1.2.3-55-g7522