diff options
author | Benjamin Jemlich <pcgod@users.sourceforge.net> | 2010-07-15 23:50:19 +0400 |
---|---|---|
committer | Benjamin Jemlich <pcgod@users.sourceforge.net> | 2010-07-20 19:31:01 +0400 |
commit | 2997897f2464390395a8b50d7467dd1a75a7d7eb (patch) | |
tree | 3d95665ad7e106cf1937c4f54d429535011afb70 /src/mumble/WASAPI.cpp | |
parent | fe9ae2d88d7edd4ffee1709059c06b7e22b3a24f (diff) |
Fix some gcc and cppcheck warnings
Diffstat (limited to 'src/mumble/WASAPI.cpp')
-rw-r--r-- | src/mumble/WASAPI.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mumble/WASAPI.cpp b/src/mumble/WASAPI.cpp index e49aebe6d..5118429d3 100644 --- a/src/mumble/WASAPI.cpp +++ b/src/mumble/WASAPI.cpp @@ -101,10 +101,8 @@ void WASAPIInit::initialize() { } void WASAPIInit::destroy() { - if (wirReg) - delete wirReg; - if (worReg) - delete worReg; + delete wirReg; + delete worReg; } @@ -596,11 +594,8 @@ cleanup: if (hEvent != NULL) CloseHandle(hEvent); - if (tbuff) - delete [] tbuff; - - if (sbuff) - delete [] sbuff; + delete [] tbuff; + delete [] sbuff; } WASAPIOutput::WASAPIOutput() { @@ -713,7 +708,6 @@ void WASAPIOutput::run() { UINT32 bufferFrameCount; REFERENCE_TIME def, min, latency, want; UINT32 numFramesAvailable; - UINT32 packetLength = 0; UINT32 wantLength; HANDLE hEvent; BYTE *pData; @@ -886,7 +880,7 @@ void WASAPIOutput::run() { if (FAILED(hr)) goto cleanup; - packetLength = bufferFrameCount - numFramesAvailable; + UINT32 packetLength = bufferFrameCount - numFramesAvailable; if (lastspoke != (g.bAttenuateOthers || mixed)) { lastspoke = g.bAttenuateOthers || mixed; |