GNOME Bugzilla – Bug 752244
Build warnings
Last modified: 2015-09-15 12:57:26 UTC
Created attachment 307257 [details] [review] remove unneeded *_class_init and *_init declarations .
Created attachment 307258 [details] [review] gvc-mixer-ui-device: fix build warnings
Created attachment 307261 [details] [review] gvc-mixer-ui-device: make stream-id unsigned int GvcMixerStream id is unsigned int and starts with 1, so we can use 0 as invalid id. This fixes build error/warning - comparison between signed and unsigned integer expressions.
Created attachment 307263 [details] [review] gvc-mixer-stream: make card-index unsigned int
Created attachment 307264 [details] [review] gvc-mixer-control: fix build warnings
These all look good to me (I would personally squash all the signed/unsigned changes in one, but it doesn't matter), but I'm not the original author of this code and I'm not a pulseaudio or libgvc expert so I'll let Bastien comment.
Review of attachment 307257 [details] [review]: Sure.
Review of attachment 307258 [details] [review]: Looks fine.
Review of attachment 307261 [details] [review]: Looks fine.
Review of attachment 307263 [details] [review]: Missing a justification.
Review of attachment 307264 [details] [review]: Rest looks fine. ::: gvc-mixer-control.c @@ -619,3 @@ /* Finally if we are not on the correct stream, swap over. */ if (stream != default_stream) { - GvcMixerUIDevice* output; Why change the name?
(In reply to Bastien Nocera from comment #10) > Review of attachment 307264 [details] [review] [review]: > > Rest looks fine. > > ::: gvc-mixer-control.c > @@ -619,3 @@ > /* Finally if we are not on the correct stream, swap over. */ > if (stream != default_stream) { > - GvcMixerUIDevice* output; > > Why change the name? To fix this warning: warning: declaration of 'output' shadows a parameter [-Wshadow]
Created attachment 310972 [details] [review] gvc-mixer-stream: make card-index unsigned int Card in pa_source_info that is used as card-index is uint32_t so it is never less then 0. Also index in GvcMixerCard is already unsigned int that is used to compare with card-index. This fixes build warning - comparison between signed and unsigned integer expressions.
Bastien, can you please look at two remaining patches?
Comment on attachment 307264 [details] [review] gvc-mixer-control: fix build warnings The name change needs a justification in the commit message.
Review of attachment 310972 [details] [review]: Sure.
Created attachment 311359 [details] [review] gvc-mixer-control: fix build warnings - Fix warning about comparison between signed and unsigned integer experssions - Change variable name 'output' to 'device' to fix warning: declaration of 'output' shadows a parameter - Fix warning about missing default case in switch
Review of attachment 311359 [details] [review]: > experssions Typo.
Created attachment 311362 [details] [review] gvc-mixer-control: fix build warnings - Fix warning about comparison between signed and unsigned integer expressions - Change variable name 'output' to 'device' to fix warning: declaration of 'output' shadows a parameter - Fix warning about missing default case in switch
Review of attachment 311362 [details] [review]: Looks good.