Skip to content

Commit 26d3431

Browse files
committed
Don't warn about acutest.h
1 parent 65be81c commit 26d3431

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

libs/c/postscriptbarcode_test.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,25 @@
3434
#include <stdlib.h>
3535
#include <string.h>
3636

37+
/*
38+
* Don't flag warnings in third-party test harness code.
39+
*/
40+
#if defined(__clang__)
41+
#elif defined(__GNUC__)
42+
# pragma GCC diagnostic push
43+
# pragma GCC diagnostic ignored "-Wsign-conversion"
44+
#elif defined(_MSC_VER)
45+
# include <CodeAnalysis/warnings.h>
46+
# pragma warning(push)
47+
# pragma warning(disable: ALL_CODE_ANALYSIS_WARNINGS)
48+
#endif
3749
#include "acutest.h"
50+
#if defined(__clang__)
51+
#elif defined(__GNUC__)
52+
# pragma GCC diagnostic pop
53+
#elif defined(_MSC_VER)
54+
# pragma warning(pop)
55+
#endif
3856
#include "postscriptbarcode.h"
3957

4058
#define MOCK_PS "test_barcode.ps"

0 commit comments

Comments
 (0)