Remove self-assignment hacks that were added to avoid unused variable warnings.

Instead, appear to use the variables.

BUG=3152
R=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/11579004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5877 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2014-04-09 21:19:55 +00:00
parent 0569d93db7
commit f93021430d

View File

@ -25,6 +25,14 @@ void EnsureInitialized() {}
#include "base/android/jni_android.h"
// Handy alternative to assert() which suppresses unused-variable warnings when
// assert() is a no-op (i.e. in Release builds).
#ifdef NDEBUG
#define ASSERT(x) if (false && (x)); else
#else
#define ASSERT(x) assert(x)
#endif
namespace webrtc {
// Declared in webrtc/modules/video_capture/include/video_capture.h.
@ -38,16 +46,14 @@ void EnsureInitializedOnce() {
JNIEnv* jni = ::base::android::AttachCurrentThread();
JavaVM* jvm = NULL;
int status = jni->GetJavaVM(&jvm);
assert(status == 0);
ASSERT(status == 0);
status = webrtc::SetCaptureAndroidVM(jvm) == 0;
assert(status);
status = status;
ASSERT(status);
}
void EnsureInitialized() {
int ret = pthread_once(&g_initialize_once, &EnsureInitializedOnce);
assert(ret == 0);
ret = ret;
ASSERT(ret == 0);
}
} // namespace videocapturemodule