[vlc-devel] [PATCH 1/3] Audioscrobbler: Update the handshake protocol to the version 2.0.
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Mar 9 18:47:44 CET 2012
The One Rule of VLC development:
If your code generates a warning, fix it.
I agree with you, don't worry :)
I would guess:
const audioscrobbler_param_t *const *p1 = elt1;
const audioscrobbler_param_t *const *p2 = elt2;
Thanks, it works fine.
On Fri, Mar 9, 2012 at 6:41 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Hello
>
> Le vendredi 9 mars 2012 19:31:43 Samuel Pitoiset, vous avez écrit :
> > I'm sorry but I got a warning with that.
>
> The One Rule of VLC development:
> If your code generates a warning, fix it.
>
> > audioscrobbler.c: In function 'Sort':
> > audioscrobbler.c:514:35: warning: initialization discards 'const'
> qualifier
> > from pointer target type [enabled by default]
> > audioscrobbler.c:514:48: warning: initialization discards 'const'
> qualifier
> > from pointer target type [enabled by default]
>
> I would guess:
>
> const audioscrobbler_param_t *const *p1 = elt1;
> const audioscrobbler_param_t *const *p2 = elt2;
>
> return strcmp((*p1)->key, (*p2)->key) ?
>
> > I think, the cast in sort() is a little weird but it works fine and I get
> > no warnings with the existing code.
>
> I would say ugly and error-prone (if someone changes the code) more so than
> weird.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> http://fi.linkedin.com/in/remidenis
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
--
Best regards,
Samuel Pitoiset.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120309/fe08d9cb/attachment.html>
More information about the vlc-devel
mailing list