GNOME Bugzilla – Bug 784755
directsoundsrc: fails to compile with gcc 7.1.0
Last modified: 2017-07-11 06:21:41 UTC
Error happens at line 873 when calling memset (pLockedBuffer, 0, dwSizeBuffer); Compiler complains about pLockedBuffer being NULL when it should not. The issue comes from a few lines above when calling IDirectSoundCaptureBuffer_Lock. In that call pLockedBuffer is erroneously passed by value when it should be passed by reference. Could explain https://bugzilla.gnome.org/show_bug.cgi?id=763322
Created attachment 355278 [details] [review] fix compilation error with gcc 7.1.0 (msys2)
Proposed patch fixes the compilation error but plugin was not tested.
Comment on attachment 355278 [details] [review] fix compilation error with gcc 7.1.0 (msys2) Looks correct. Did you check if there are similar bugs elsewhere (directsoundsink and the Unlock() method)?
I checked all other calls to _Lock() and _Unlock() in both directsoundsrc and directsoundsink and they look ok.
commit db36718ee4c54d4bf2478cbf561f06bb7b84dbcf (HEAD -> master) Author: Philippe Renon <philippe_renon@yahoo.fr> Date: Mon Jul 10 17:35:32 2017 +0200 directsoundsrc: Properly pass pLockedBuffer by reference when calling IDirectSoundCaptureBuffer_Lock https://bugzilla.gnome.org/show_bug.cgi?id=784755