After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752244 - Build warnings
Build warnings
Status: RESOLVED FIXED
Product: libgnome-volume-control
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: libgnome-volume-control-maint
libgnome-volume-control-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-10 18:16 UTC by Alberts Muktupāvels
Modified: 2015-09-15 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove unneeded *_class_init and *_init declarations (5.73 KB, patch)
2015-07-10 18:16 UTC, Alberts Muktupāvels
committed Details | Review
gvc-mixer-ui-device: fix build warnings (2.67 KB, patch)
2015-07-10 18:17 UTC, Alberts Muktupāvels
committed Details | Review
gvc-mixer-ui-device: make stream-id unsigned int (4.36 KB, patch)
2015-07-10 18:58 UTC, Alberts Muktupāvels
committed Details | Review
gvc-mixer-stream: make card-index unsigned int (2.62 KB, patch)
2015-07-10 19:11 UTC, Alberts Muktupāvels
none Details | Review
gvc-mixer-control: fix build warnings (4.88 KB, patch)
2015-07-10 19:11 UTC, Alberts Muktupāvels
none Details | Review
gvc-mixer-stream: make card-index unsigned int (2.92 KB, patch)
2015-09-09 12:04 UTC, Alberts Muktupāvels
committed Details | Review
gvc-mixer-control: fix build warnings (5.10 KB, patch)
2015-09-15 12:43 UTC, Alberts Muktupāvels
none Details | Review
gvc-mixer-control: fix build warnings (5.10 KB, patch)
2015-09-15 12:47 UTC, Alberts Muktupāvels
committed Details | Review

Description Alberts Muktupāvels 2015-07-10 18:16:31 UTC
Created attachment 307257 [details] [review]
remove unneeded *_class_init and *_init declarations

.
Comment 1 Alberts Muktupāvels 2015-07-10 18:17:13 UTC
Created attachment 307258 [details] [review]
gvc-mixer-ui-device: fix build warnings
Comment 2 Alberts Muktupāvels 2015-07-10 18:58:35 UTC
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.
Comment 3 Alberts Muktupāvels 2015-07-10 19:11:29 UTC
Created attachment 307263 [details] [review]
gvc-mixer-stream: make card-index unsigned int
Comment 4 Alberts Muktupāvels 2015-07-10 19:11:42 UTC
Created attachment 307264 [details] [review]
gvc-mixer-control: fix build warnings
Comment 5 Giovanni Campagna 2015-09-08 02:20:30 UTC
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.
Comment 6 Bastien Nocera 2015-09-09 09:24:43 UTC
Review of attachment 307257 [details] [review]:

Sure.
Comment 7 Bastien Nocera 2015-09-09 09:26:11 UTC
Review of attachment 307258 [details] [review]:

Looks fine.
Comment 8 Bastien Nocera 2015-09-09 09:27:38 UTC
Review of attachment 307261 [details] [review]:

Looks fine.
Comment 9 Bastien Nocera 2015-09-09 09:28:27 UTC
Review of attachment 307263 [details] [review]:

Missing a justification.
Comment 10 Bastien Nocera 2015-09-09 09:29:43 UTC
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?
Comment 11 Alberts Muktupāvels 2015-09-09 11:28:34 UTC
(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]
Comment 12 Alberts Muktupāvels 2015-09-09 12:04:09 UTC
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.
Comment 13 Alberts Muktupāvels 2015-09-14 12:05:58 UTC
Bastien, can you please look at two remaining patches?
Comment 14 Bastien Nocera 2015-09-15 12:29:36 UTC
Comment on attachment 307264 [details] [review]
gvc-mixer-control: fix build warnings

The name change needs a justification in the commit message.
Comment 15 Bastien Nocera 2015-09-15 12:30:15 UTC
Review of attachment 310972 [details] [review]:

Sure.
Comment 16 Alberts Muktupāvels 2015-09-15 12:43:50 UTC
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
Comment 17 Bastien Nocera 2015-09-15 12:44:54 UTC
Review of attachment 311359 [details] [review]:

>   experssions

Typo.
Comment 18 Alberts Muktupāvels 2015-09-15 12:47:39 UTC
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
Comment 19 Bastien Nocera 2015-09-15 12:55:15 UTC
Review of attachment 311362 [details] [review]:

Looks good.