On Sun, Oct 25, 2015 at 12:02 AM, Ganesh Ajjanagadde <gajjanaga...@gmail.com> wrote: > -static int cmp(void *key, const void *node) > +static int cmp(const void *key, const void *node) > { > return (*(int64_t *) key) - ((const CacheEntry *) node)->logical_pos; > }
> -int ff_nut_sp_pos_cmp(const Syncpoint *a, const Syncpoint *b) > +int ff_nut_sp_pos_cmp(const void *a, const void *b) > { > - return ((a->pos - b->pos) >> 32) - ((b->pos - a->pos) >> 32); > + Syncpoint va = *(Syncpoint *)a, vb = *(Syncpoint *)b; > + return ((va.pos - vb.pos) >> 32) - ((vb.pos - va.pos) >> 32); > } > -int ff_nut_sp_pts_cmp(const Syncpoint *a, const Syncpoint *b) > +int ff_nut_sp_pts_cmp(const void *a, const void *b) > { > - return ((a->ts - b->ts) >> 32) - ((b->ts - a->ts) >> 32); > + Syncpoint va = *(Syncpoint *)a, vb = *(Syncpoint *)b; > + return ((va.ts - vb.ts) >> 32) - ((vb.ts - va.ts) >> 32); > } Casts discards const qualifiers. Furthermore, why are you changing the two last functions to copy the entire struct to a temporary local copy? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel