@@ -123,10 +123,9 @@ void fossil_mock_print(fossil_mock_calllist_t *list);
123123 * @param buffer The buffer to store the captured output.
124124 * @param size The size of the buffer.
125125 * @param function The function whose output is to be captured.
126- * @param ... The arguments to pass to the function.
127126 * @return The number of characters captured.
128127 */
129- int fossil_mock_capture_output (char * buffer , size_t size , void (* function )(void ), ... );
128+ int fossil_mock_capture_output (char * buffer , size_t size , void (* function )(void ));
130129
131130/**
132131 * Compares the captured output with the expected output.
@@ -240,20 +239,8 @@ bool fossil_mock_compare_output(const char *captured, const char *expected);
240239 * @param buffer The buffer to capture the output.
241240 * @param size The size of the buffer.
242241 */
243- #ifdef _WIN32
244- #define _FOSSIL_MOCK_CAPTURE_OUTPUT (buffer , size , function , ...) \
245- fossil_mock_capture_output(buffer, size, function, __VA_ARGS__)
246- #elif defined(__APPLE__ )
247- #define _FOSSIL_MOCK_CAPTURE_OUTPUT (buffer , size , function , ...) \
248- fossil_mock_capture_output(buffer, size, function, __VA_OPT(, __VA_ARGS__))
249- #else
250- #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201710L
251- #define _FOSSIL_MOCK_CAPTURE_OUTPUT (buffer , size , function , ...) \
252- fossil_mock_capture_output(buffer, size, function, __VA_OPT(, __VA_ARGS__))
253- #else
254- #define _FOSSIL_MOCK_CAPTURE_OUTPUT (buffer , size , function , ...) \
255- fossil_mock_capture_output(buffer, size, function, __VA_ARGS__)
256- #endif
242+ #define _FOSSIL_MOCK_CAPTURE_OUTPUT (buffer , size , function ) \
243+ fossil_mock_capture_output(buffer, size, function)
257244#endif
258245
259246/**
@@ -365,21 +352,8 @@ bool fossil_mock_compare_output(const char *captured, const char *expected);
365352 * @param buffer The buffer to capture the output.
366353 * @param size The size of the buffer.
367354 */
368- #ifdef _WIN32
369- #define FOSSIL_MOCK_REDIRECT_STDOUT (buffer , size , function , ...) \
370- _FOSSIL_MOCK_CAPTURE_OUTPUT(buffer, size, function, __VA_ARGS__)
371- #elif defined(__APPLE__ )
372- #define FOSSIL_MOCK_REDIRECT_STDOUT (buffer , size , function , ...) \
373- _FOSSIL_MOCK_CAPTURE_OUTPUT(buffer, size, function, __VA_OPT(, __VA_ARGS__))
374- #else
375- #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201710L
376- #define FOSSIL_MOCK_REDIRECT_STDOUT (buffer , size , function , ...) \
377- _FOSSIL_MOCK_CAPTURE_OUTPUT(buffer, size, function, __VA_OPT(, __VA_ARGS__))
378- #else
379- #define FOSSIL_MOCK_REDIRECT_STDOUT (buffer , size , function , ...) \
380- _FOSSIL_MOCK_CAPTURE_OUTPUT(buffer, size, function, __VA_ARGS__)
381- #endif
382- #endif
355+ #define FOSSIL_MOCK_REDIRECT_STDOUT (buffer , size , function ) \
356+ _FOSSIL_MOCK_CAPTURE_OUTPUT(buffer, size, function)
383357
384358/**
385359 * @def FOSSIL_MOCK_COMPARE_OUTPUT
0 commit comments