Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: minidump/minidump_extensions.h

Issue 896663006: win: Resolve zero-length array errors on MSVC (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump-comp
Patch Set: . Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ 15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_
16 #define CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ 16 #define CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_
17 17
18 #include <windows.h> 18 #include <windows.h>
19 #include <dbghelp.h> 19 #include <dbghelp.h>
20 #include <stdint.h> 20 #include <stdint.h>
21 #include <winnt.h> 21 #include <winnt.h>
22 22
23 #include "base/compiler_specific.h" 23 #include "base/compiler_specific.h"
24 #include "build/build_config.h" 24 #include "build/build_config.h"
25 #include "util/misc/uuid.h" 25 #include "util/misc/uuid.h"
26 26
27 #if defined(COMPILER_MSVC) 27 #if defined(COMPILER_MSVC)
28 // C4200 is "nonstandard extension used : zero-sized array in struct/union".
29 // We would like to globally disable this warning, but unfortunately, the
30 // compiler is buggy and only supports disabling it with a pragma, so we can't
31 // disable it with other silly warnings in build/common.gypi. See:
32 // https://connect.microsoft.com/VisualStudio/feedback/details/1114440
33 #pragma warning(disable: 4200)
Mark Mentovai 2015/02/04 21:25:15 Can we undisable it at the end of this header and
scottmg 2015/02/05 01:33:26 Done.
34 #endif // COMPILER_MSVC
35
36 #if defined(COMPILER_MSVC)
28 #define PACKED 37 #define PACKED
29 #pragma pack(push, 1) 38 #pragma pack(push, 1)
30 #else 39 #else
31 #define PACKED __attribute__((packed)) 40 #define PACKED __attribute__((packed))
32 #endif // COMPILER_MSVC 41 #endif // COMPILER_MSVC
33 42
34 namespace crashpad { 43 namespace crashpad {
35 44
36 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each 45 //! \brief Minidump stream type values for MINIDUMP_DIRECTORY::StreamType. Each
37 //! stream structure has a corresponding stream type value to identify it. 46 //! stream structure has a corresponding stream type value to identify it.
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 }; 465 };
457 466
458 #if defined(COMPILER_MSVC) 467 #if defined(COMPILER_MSVC)
459 #pragma pack(pop) 468 #pragma pack(pop)
460 #endif // COMPILER_MSVC 469 #endif // COMPILER_MSVC
461 #undef PACKED 470 #undef PACKED
462 471
463 } // namespace crashpad 472 } // namespace crashpad
464 473
465 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ 474 #endif // CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698