From 97fbf4e7ae1416c60e70657e5b918e9e0d129383 Mon Sep 17 00:00:00 2001 From: Daniel Richard G Date: Sat, 4 Aug 2012 13:20:17 +0200 Subject: [PATCH 1/1] compare_snapshots(): Add const keyword. This fixes a "cast drops const qualifier" warning. --- snap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snap.c b/snap.c index d1caf56..71b7e30 100644 --- a/snap.c +++ b/snap.c @@ -146,8 +146,8 @@ static int add_snapshot(const char *dirname, void *private) static int compare_snapshots(const void *a, const void *b) { - struct snapshot *s1 = *(struct snapshot **)a; - struct snapshot *s2 = *(struct snapshot **)b; + struct snapshot *s1 = *(struct snapshot * const *)a; + struct snapshot *s2 = *(struct snapshot * const *)b; return NUM_COMPARE(s2->creation_time, s1->creation_time); } -- 2.39.2