Skip to content

Commit

Permalink
ignore some warnings about variadic macros
Browse files Browse the repository at this point in the history
  • Loading branch information
aharren committed Aug 26, 2012
1 parent 36ea9ba commit 33d1406
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
15 changes: 15 additions & 0 deletions LCLSystemLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@
[_lcl_logger_autoreleasepool release];
#endif

#ifndef _LCL_NO_IGNORE_WARNINGS
# ifdef __clang__
// Ignore some warnings about variadic macros when using '-Weverything'.
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
# pragma clang diagnostic ignored "-Wvariadic-macros"
# pragma clang diagnostic ignored "-Wpedantic"
# endif
#endif

// Define the _lcl_logger macro which integrates LCLSystemLog as a logging
// back-end for LibComponentLogging and pass the header of a log component as
Expand All @@ -228,3 +237,9 @@
_lcl_logger_autoreleasepool_end \
}

#ifndef _LCL_NO_IGNORE_WARNINGS
# ifdef __clang__
# pragma clang diagnostic pop
# endif
#endif

16 changes: 16 additions & 0 deletions devel/SystemLog-Tests/SystemLogTests.pch
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import "lcl.h"

#ifdef __clang__
// Ignore some warnings about variadic macros when using '-Weverything'.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wvariadic-macros"
#pragma clang diagnostic ignored "-Wpedantic"
#endif

#import <SenTestingKit/SenTestingKit.h>

#ifdef __clang__
#pragma clang diagnostic pop
#endif

0 comments on commit 33d1406

Please sign in to comment.