Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/cpp/src/thrift/TLogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#if T_GLOBAL_DEBUGGING_LEVEL > 0
#define T_DEBUG(format_string, ...) \
if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \
fprintf(stderr, "[%s,%d] " format_string " \n", __FILE__, __LINE__, ##__VA_ARGS__); \
fprintf(stderr, "[%s,%d] " format_string " \n", __FILE__, __LINE__, __VA_ARGS__); \
}
#else
#define T_DEBUG(format_string, ...)
Expand All @@ -80,7 +80,7 @@
__FILE__, \
__LINE__, \
dbgtime, \
##__VA_ARGS__); \
__VA_ARGS__); \
} \
}
#else
Expand All @@ -96,7 +96,7 @@
*/
#define T_DEBUG_L(level, format_string, ...) \
if ((level) > 0) { \
fprintf(stderr, "[%s,%d] " format_string " \n", __FILE__, __LINE__, ##__VA_ARGS__); \
fprintf(stderr, "[%s,%d] " format_string " \n", __FILE__, __LINE__, __VA_ARGS__); \
}

/**
Expand All @@ -116,7 +116,7 @@
__FILE__, \
__LINE__, \
dbgtime, \
##__VA_ARGS__); \
__VA_ARGS__); \
}

/**
Expand All @@ -137,7 +137,7 @@
__FILE__, \
__LINE__, \
dbgtime, \
##__VA_ARGS__); \
__VA_ARGS__); \
exit(1); \
}

Expand All @@ -155,7 +155,7 @@
time(&now); \
THRIFT_CTIME_R(&now, dbgtime); \
dbgtime[24] = '\0'; \
fprintf(stderr, "[%s] " format_string " \n", dbgtime, ##__VA_ARGS__); \
fprintf(stderr, "[%s] " format_string " \n", dbgtime, __VA_ARGS__); \
} \
}
#else
Expand Down
12 changes: 6 additions & 6 deletions lib/cpp/test/TransportTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,23 +784,23 @@ void test_borrow_none_available() {
**************************************************************************/

#define ADD_TEST_RW(CoupledTransports, totalSize, ...) \
addTestRW<CoupledTransports>(BOOST_STRINGIZE(CoupledTransports), totalSize, ##__VA_ARGS__);
addTestRW<CoupledTransports>(BOOST_STRINGIZE(CoupledTransports), totalSize, __VA_ARGS__);

#define TEST_RW(CoupledTransports, totalSize, ...) \
do { \
/* Add the test as specified, to test the non-virtual function calls */ \
ADD_TEST_RW(CoupledTransports, totalSize, ##__VA_ARGS__); \
ADD_TEST_RW(CoupledTransports, totalSize, __VA_ARGS__); \
/* \
* Also test using the transport as a TTransport*, to test \
* the read_virt()/write_virt() calls \
*/ \
ADD_TEST_RW(CoupledTTransports<CoupledTransports>, totalSize, ##__VA_ARGS__); \
ADD_TEST_RW(CoupledTTransports<CoupledTransports>, totalSize, __VA_ARGS__); \
/* Test wrapping the transport with TBufferedTransport */ \
ADD_TEST_RW(CoupledBufferedTransportsT<CoupledTransports>, totalSize, ##__VA_ARGS__); \
ADD_TEST_RW(CoupledBufferedTransportsT<CoupledTransports>, totalSize, __VA_ARGS__); \
/* Test wrapping the transport with TFramedTransports */ \
ADD_TEST_RW(CoupledFramedTransportsT<CoupledTransports>, totalSize, ##__VA_ARGS__); \
ADD_TEST_RW(CoupledFramedTransportsT<CoupledTransports>, totalSize, __VA_ARGS__); \
/* Test wrapping the transport with TZlibTransport */ \
ADD_TEST_RW(CoupledZlibTransportsT<CoupledTransports>, totalSize, ##__VA_ARGS__); \
ADD_TEST_RW(CoupledZlibTransportsT<CoupledTransports>, totalSize, __VA_ARGS__); \
} while (0)

#define ADD_TEST_BLOCKING(CoupledTransports) \
Expand Down
6 changes: 2 additions & 4 deletions lib/cpp/test/ZlibTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ void test_get_underlying_transport() {
do { \
::std::ostringstream name_ss; \
name_ss << name << "-" << BOOST_STRINGIZE(_FUNC); \
::std::function<void ()> test_func = \
::std::bind(_FUNC, ##__VA_ARGS__); \
::std::function<void ()> test_func = ::std::bind(_FUNC, __VA_ARGS__); \
::boost::unit_test::test_case* tc \
= ::boost::unit_test::make_test_case(test_func, name_ss.str(), __FILE__, __LINE__); \
(suite)->add(tc); \
Expand All @@ -359,8 +358,7 @@ void test_get_underlying_transport() {
::std::ostringstream name_ss; \
name_ss << name << "-" << BOOST_STRINGIZE(_FUNC); \
::boost::unit_test::test_case* tc \
= ::boost::unit_test::make_test_case(::std::bind(_FUNC, \
##__VA_ARGS__), \
= ::boost::unit_test::make_test_case(::std::bind(_FUNC, __VA_ARGS__), \
name_ss.str()); \
(suite)->add(tc); \
} while (0)
Expand Down
Loading