forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-sound/mumble: Fix build with GCC 4.9.
Gentoo-Bug: https://bugs.gentoo.org/532180 Package-Manager: portage-2.2.22 Signed-off-by: Ryan Hill <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
https://bugs.gentoo.org/532180 | ||
|
||
Avoid "jump to label crosses initialization" error. | ||
|
||
Move variable "buffer" into the while loop to avoid a compile error | ||
with g++ 4.9.0. | ||
|
||
Although earlier compiler versions did accept the code, jumping into the | ||
scope of an variable length array is not allowed: | ||
http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Variable-Length.html | ||
|
||
|
||
--- a/src/mumble/OSS.cpp | ||
+++ b/src/mumble/OSS.cpp | ||
@@ -243,9 +243,9 @@ void OSSInput::run() { | ||
eMicFormat = SampleShort; | ||
initializeMixer(); | ||
|
||
- short buffer[iMicLength]; | ||
- | ||
while (bRunning) { | ||
+ short buffer[iMicLength]; | ||
+ | ||
int len = static_cast<int>(iMicLength * iMicChannels * sizeof(short)); | ||
ssize_t l = read(fd, buffer, len); | ||
if (l != len) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters