From: Daniel Richard G Date: Sat, 4 Aug 2012 11:20:17 +0000 (+0200) Subject: compare_snapshots(): Add const keyword. X-Git-Tag: v0.1.5~12^2~5 X-Git-Url: http://git.tuebingen.mpg.de/?p=dss.git;a=commitdiff_plain;h=97fbf4e7ae1416c60e70657e5b918e9e0d129383;hp=b28495993eef26688c998650d0e2bf944082704e compare_snapshots(): Add const keyword. This fixes a "cast drops const qualifier" warning. --- 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); }