diff options
author | Lei Zhang <thestig@google.com> | 2016-01-06 14:17:16 -0800 |
---|---|---|
committer | Lei Zhang <thestig@google.com> | 2016-01-06 14:17:16 -0800 |
commit | ee4d8ffed4f0620ba7618c104973f4f0fd7de164 (patch) | |
tree | 7aa81ac3b71ed49e567d6772022554c15d671df9 | |
parent | Fix -Wunused-function warnings in ASAN builds. (diff) | |
download | breakpad-ee4d8ffed4f0620ba7618c104973f4f0fd7de164.tar.xz |
Make minidump-2-core.cc build with -Wformat.
A=thakis@chromium.org
BUG=chromium:574817
Original Review: https://codereview.chromium.org/1562983002/
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1563043002 .
-rw-r--r-- | src/google_breakpad/common/breakpad_types.h | 6 | ||||
-rw-r--r-- | src/tools/linux/md2core/minidump-2-core.cc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/google_breakpad/common/breakpad_types.h b/src/google_breakpad/common/breakpad_types.h index c936e1e6..d8828043 100644 --- a/src/google_breakpad/common/breakpad_types.h +++ b/src/google_breakpad/common/breakpad_types.h @@ -40,6 +40,12 @@ #ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ #define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ +#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && \ + !defined(__STDC_FORMAT_MACROS) +#error "inttypes.h has already been included before this header file, but " +#error "without __STDC_FORMAT_MACROS defined." +#endif + #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif /* __STDC_FORMAT_MACROS */ diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc index 8e9cd129..102ce677 100644 --- a/src/tools/linux/md2core/minidump-2-core.cc +++ b/src/tools/linux/md2core/minidump-2-core.cc @@ -35,7 +35,6 @@ #include <elf.h> #include <errno.h> -#include <inttypes.h> #include <link.h> #include <stdio.h> #include <stdlib.h> @@ -50,6 +49,7 @@ #include "common/linux/memory_mapped_file.h" #include "common/minidump_type_helper.h" #include "common/scoped_ptr.h" +#include "google_breakpad/common/breakpad_types.h" #include "google_breakpad/common/minidump_format.h" #include "third_party/lss/linux_syscall_support.h" #include "tools/linux/md2core/minidump_memory_range.h" |