aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/windows/tests/crash_generation_app/crash_generation_app.cc2
-rw-r--r--src/client/windows/unittests/client_tests.gyp1
-rw-r--r--src/client/windows/unittests/crash_generation_server_test.cc7
-rw-r--r--src/google_breakpad/common/breakpad_types.h24
-rw-r--r--src/processor/dump_context.cc4
-rw-r--r--src/processor/minidump.cc4
-rw-r--r--src/processor/proc_maps_linux.cc12
7 files changed, 15 insertions, 39 deletions
diff --git a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc
index ad395d6c..0d837e52 100644
--- a/src/client/windows/tests/crash_generation_app/crash_generation_app.cc
+++ b/src/client/windows/tests/crash_generation_app/crash_generation_app.cc
@@ -73,7 +73,7 @@ BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
-static int kCustomInfoCount = 2;
+static size_t kCustomInfoCount = 2;
static CustomInfoEntry kCustomInfoEntries[] = {
CustomInfoEntry(L"prod", L"CrashTestApp"),
CustomInfoEntry(L"ver", L"1.0"),
diff --git a/src/client/windows/unittests/client_tests.gyp b/src/client/windows/unittests/client_tests.gyp
index 7f9c7a02..b13603ef 100644
--- a/src/client/windows/unittests/client_tests.gyp
+++ b/src/client/windows/unittests/client_tests.gyp
@@ -73,6 +73,7 @@
'<(DEPTH)/processor/logging.cc',
'<(DEPTH)/processor/minidump.cc',
'<(DEPTH)/processor/pathname_stripper.cc',
+ '<(DEPTH)/processor/proc_maps_linux.cc',
]
}
],
diff --git a/src/client/windows/unittests/crash_generation_server_test.cc b/src/client/windows/unittests/crash_generation_server_test.cc
index cf95d43f..b7b2b84f 100644
--- a/src/client/windows/unittests/crash_generation_server_test.cc
+++ b/src/client/windows/unittests/crash_generation_server_test.cc
@@ -50,9 +50,8 @@ const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION |
const DWORD kPipeMode = PIPE_READMODE_MESSAGE;
-int kCustomInfoCount = 2;
-
-google_breakpad::CustomInfoEntry kCustomInfoEntries[] = {
+#define arraysize(f) (sizeof(f) / sizeof(*f))
+const google_breakpad::CustomInfoEntry kCustomInfoEntries[] = {
google_breakpad::CustomInfoEntry(L"prod", L"CrashGenerationServerTest"),
google_breakpad::CustomInfoEntry(L"ver", L"1.0"),
};
@@ -165,7 +164,7 @@ class CrashGenerationServerTest : public ::testing::Test {
}
google_breakpad::CustomClientInfo custom_info = {kCustomInfoEntries,
- kCustomInfoCount};
+ arraysize(kCustomInfoEntries)};
google_breakpad::ProtocolMessage msg(
fault_type == SEND_INVALID_REGISTRATION ?
diff --git a/src/google_breakpad/common/breakpad_types.h b/src/google_breakpad/common/breakpad_types.h
index e92436ff..c936e1e6 100644
--- a/src/google_breakpad/common/breakpad_types.h
+++ b/src/google_breakpad/common/breakpad_types.h
@@ -40,35 +40,11 @@
#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__
#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__
-#ifndef _WIN32
-
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif /* __STDC_FORMAT_MACROS */
#include <inttypes.h>
-#else /* !_WIN32 */
-
-#if _MSC_VER >= 1600
-#include <stdint.h>
-#elif defined(BREAKPAD_CUSTOM_STDINT_H)
-/* Visual C++ Pre-2010 did not ship a stdint.h, so allow
- * consumers of this library to provide their own because
- * there are often subtle type incompatibilities.
- */
-#include BREAKPAD_CUSTOM_STDINT_H
-#else
-#include <wtypes.h>
-
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-#endif
-
-#endif /* !_WIN32 */
-
typedef struct {
uint64_t high;
uint64_t low;
diff --git a/src/processor/dump_context.cc b/src/processor/dump_context.cc
index 612556a2..49fb77b1 100644
--- a/src/processor/dump_context.cc
+++ b/src/processor/dump_context.cc
@@ -38,9 +38,9 @@
#ifdef _WIN32
#include <io.h>
-#define PRIx64 "llx"
-#define PRIx32 "lx"
+#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
+#endif
#else // _WIN32
#include <unistd.h>
#endif // _WIN32
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index 85ec6b9c..f2240026 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -44,9 +44,9 @@
#ifdef _WIN32
#include <io.h>
-#define PRIx64 "llx"
-#define PRIx32 "lx"
+#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
+#endif
#else // _WIN32
#include <unistd.h>
#endif // _WIN32
diff --git a/src/processor/proc_maps_linux.cc b/src/processor/proc_maps_linux.cc
index ed185712..0cd3772e 100644
--- a/src/processor/proc_maps_linux.cc
+++ b/src/processor/proc_maps_linux.cc
@@ -34,16 +34,16 @@ bool ParseProcMaps(const std::string& input,
// Split the string by newlines.
std::vector<std::string> lines;
- std::string line = "";
+ std::string l = "";
for (size_t i = 0; i < input.size(); i++) {
if (input[i] != '\n' && input[i] != '\r') {
- line.push_back(input[i]);
- } else if (line.size() > 0) {
- lines.push_back(line);
- line.clear();
+ l.push_back(input[i]);
+ } else if (l.size() > 0) {
+ lines.push_back(l);
+ l.clear();
}
}
- if (line.size() > 0) {
+ if (l.size() > 0) {
BPLOG(ERROR) << "Input doesn't end in newline";
return false;
}