libvpx's UNUSED macro conflicts with webrtc/base's. Added missing include of assert.h. Globally defined function "Unused" in talk/base and its copy (webrtc/base) is causing a conflict.
libvpx macro (UNUSED) can be found here: http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/libvpx/source/libvpx/vpx/vpx_codec.h BUG=N/A R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/17489004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6185 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a3b5673879
commit
14abcc7322
@ -125,26 +125,6 @@ namespace rtc {
|
||||
((t) - 1)) & ~((t) - 1))))
|
||||
#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
|
||||
|
||||
// Note: UNUSED is also defined in common.h
|
||||
#ifndef UNUSED
|
||||
#define UNUSED(x) Unused(static_cast<const void*>(&x))
|
||||
#define UNUSED2(x, y) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y))
|
||||
#define UNUSED3(x, y, z) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z))
|
||||
#define UNUSED4(x, y, z, a) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z)); \
|
||||
Unused(static_cast<const void*>(&a))
|
||||
#define UNUSED5(x, y, z, a, b) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z)); \
|
||||
Unused(static_cast<const void*>(&a)); \
|
||||
Unused(static_cast<const void*>(&b))
|
||||
inline void Unused(const void*) {}
|
||||
#endif // UNUSED
|
||||
|
||||
// Use these to declare and define a static local variable (static T;) so that
|
||||
// it is leaked so that its destructors are not called at exit.
|
||||
#define LIBJINGLE_DEFINE_STATIC_LOCAL(type, name, arguments) \
|
||||
|
@ -23,25 +23,24 @@
|
||||
// General Utilities
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Note: UNUSED is also defined in basictypes.h
|
||||
#ifndef UNUSED
|
||||
#define UNUSED(x) Unused(static_cast<const void*>(&x))
|
||||
#define UNUSED2(x, y) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y))
|
||||
#define UNUSED3(x, y, z) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z))
|
||||
#define UNUSED4(x, y, z, a) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z)); \
|
||||
Unused(static_cast<const void*>(&a))
|
||||
#define UNUSED5(x, y, z, a, b) Unused(static_cast<const void*>(&x)); \
|
||||
Unused(static_cast<const void*>(&y)); \
|
||||
Unused(static_cast<const void*>(&z)); \
|
||||
Unused(static_cast<const void*>(&a)); \
|
||||
Unused(static_cast<const void*>(&b))
|
||||
inline void Unused(const void*) {}
|
||||
#endif // UNUSED
|
||||
#ifndef RTC_UNUSED
|
||||
#define RTC_UNUSED(x) RtcUnused(static_cast<const void*>(&x))
|
||||
#define RTC_UNUSED2(x, y) RtcUnused(static_cast<const void*>(&x)); \
|
||||
RtcUnused(static_cast<const void*>(&y))
|
||||
#define RTC_UNUSED3(x, y, z) RtcUnused(static_cast<const void*>(&x)); \
|
||||
RtcUnused(static_cast<const void*>(&y)); \
|
||||
RtcUnused(static_cast<const void*>(&z))
|
||||
#define RTC_UNUSED4(x, y, z, a) RtcUnused(static_cast<const void*>(&x)); \
|
||||
RtcUnused(static_cast<const void*>(&y)); \
|
||||
RtcUnused(static_cast<const void*>(&z)); \
|
||||
RtcUnused(static_cast<const void*>(&a))
|
||||
#define RTC_UNUSED5(x, y, z, a, b) RtcUnused(static_cast<const void*>(&x)); \
|
||||
RtcUnused(static_cast<const void*>(&y)); \
|
||||
RtcUnused(static_cast<const void*>(&z)); \
|
||||
RtcUnused(static_cast<const void*>(&a)); \
|
||||
RtcUnused(static_cast<const void*>(&b))
|
||||
inline void RtcUnused(const void*) {}
|
||||
#endif // RTC_UNUSED
|
||||
|
||||
#if !defined(WEBRTC_WIN)
|
||||
|
||||
|
@ -222,7 +222,7 @@ HttpServer::Connection::onHttpComplete(HttpMode mode, HttpError err) {
|
||||
|
||||
void
|
||||
HttpServer::Connection::onHttpClosed(HttpError err) {
|
||||
UNUSED(err);
|
||||
RTC_UNUSED(err);
|
||||
server_->Remove(connection_id_);
|
||||
}
|
||||
|
||||
|
@ -144,8 +144,8 @@ static int socket_puts(BIO* b, const char* str) {
|
||||
}
|
||||
|
||||
static long socket_ctrl(BIO* b, int cmd, long num, void* ptr) {
|
||||
UNUSED(num);
|
||||
UNUSED(ptr);
|
||||
RTC_UNUSED(num);
|
||||
RTC_UNUSED(ptr);
|
||||
|
||||
switch (cmd) {
|
||||
case BIO_CTRL_RESET:
|
||||
|
@ -144,8 +144,8 @@ static int stream_puts(BIO* b, const char* str) {
|
||||
}
|
||||
|
||||
static long stream_ctrl(BIO* b, int cmd, long num, void* ptr) {
|
||||
UNUSED(num);
|
||||
UNUSED(ptr);
|
||||
RTC_UNUSED(num);
|
||||
RTC_UNUSED(ptr);
|
||||
|
||||
switch (cmd) {
|
||||
case BIO_CTRL_RESET:
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include "webrtc/modules/audio_device/android/single_rw_fifo.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
static int UpdatePos(int pos, int capacity) {
|
||||
return (pos + 1) % capacity;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user