[vlc-devel] [PATCH 1/3] Audioscrobbler: Update the handshake protocol to the version 2.0.
Rémi Denis-Courmont
remi at remlab.net
Fri Mar 9 18:41:19 CET 2012
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
More information about the vlc-devel
mailing list