Merge lp:~brandontschaefer/unity/fix-C99-init-list-warning into lp:unity/phablet

Proposed by Brandon Schaefer
Status: Rejected
Rejected by: Brandon Schaefer
Proposed branch: lp:~brandontschaefer/unity/fix-C99-init-list-warning
Merge into: lp:unity/phablet
Diff against target: 16 lines (+1/-5)
1 file modified
plugins/HudClient/volumepeakdetector.cpp (+1/-5)
To merge this branch: bzr merge lp:~brandontschaefer/unity/fix-C99-init-list-warning
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Unity Team Pending
Review via email: mp+157466@code.launchpad.net

Commit message

Move from C99 to c++0x initializer list. Fixing 3 of these warnings:
warning: ISO C++ does not allow C99 designated initializers [-pedantic]

Description of the change

Move from C99 to c++0x initializer list. Also fixes warnings.
    HudClient/volumepeakdetector.cpp:118:34: warning: ISO C++ does not allow C99 designated initializers [-pedantic]
    HudClient/volumepeakdetector.cpp:119:36: warning: ISO C++ does not allow C99 designated initializers [-pedantic]
    HudClient/volumepeakdetector.cpp:120:34: warning: ISO C++ does not allow C99 designated initializers [-pedantic]

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

This is already to be fixed in a different branch.

Unmerged revisions

545. By Brandon Schaefer

* Move from C99 to c++0x initializer list. Also fixes warnings.

HudClient/volumepeakdetector.cpp:118:34: warning: ISO C++ does not allow C99 designated initializers [-pedantic]
HudClient/volumepeakdetector.cpp:119:36: warning: ISO C++ does not allow C99 designated initializers [-pedantic]
HudClient/volumepeakdetector.cpp:120:34: warning: ISO C++ does not allow C99 designated initializers [-pedantic]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/HudClient/volumepeakdetector.cpp'
2--- plugins/HudClient/volumepeakdetector.cpp 2013-04-05 08:56:12 +0000
3+++ plugins/HudClient/volumepeakdetector.cpp 2013-04-05 19:29:22 +0000
4@@ -115,11 +115,7 @@
5 {
6 pa_buffer_attr buffer_attr;
7 pa_proplist *proplist = pa_proplist_new();
8- pa_sample_spec sample_spec = {
9- .format = PA_SAMPLE_FLOAT32,
10- .rate = voice_needed_rate,
11- .channels = 1
12- };
13+ pa_sample_spec sample_spec = { PA_SAMPLE_FLOAT32, voice_needed_rate, 1 };
14 pa_channel_map channel_map;
15
16 pa_channel_map_init_extend(&channel_map, sample_spec.channels, PA_CHANNEL_MAP_DEFAULT);

Subscribers

People subscribed via source and target branches