From e8ab9afd82396d856cae24db04eddf8c4e939c44 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Mon, 15 Dec 2014 16:01:16 -0800 Subject: [PATCH] win: Avoid 'warning C4068: unknown pragma' I could also add COMPILER_CLANG to build_config.h, but that doesn't appear in Chromium, apparently in preference to using __clang__ directly. I'm not sure if there's any good reason for that. R=mark@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/803283002 --- client/crashpad_info.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/crashpad_info.h b/client/crashpad_info.h index 27ad1292..86afff13 100644 --- a/client/crashpad_info.h +++ b/client/crashpad_info.h @@ -48,15 +48,21 @@ struct CrashpadInfo { // shouldn’t warn about that. These fields aren’t intended for use by the // process they’re found in, they’re supposed to be read by the crash // reporting process. +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" +#endif + // Fields present in version 1: uint32_t signature_; // kSignature uint32_t size_; // The size of the entire CrashpadInfo structure. uint32_t version_; // kVersion uint32_t padding_0_; SimpleStringDictionary* simple_annotations_; // weak + +#if defined(__clang__) #pragma clang diagnostic pop +#endif DISALLOW_COPY_AND_ASSIGN(CrashpadInfo); };