From f65d860640b832e0a28121c68e0228090476b439 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Thu, 21 Aug 2014 22:27:33 -0700 Subject: [PATCH] Cleaning up some clang issues. --- src/alloy/arena.h | 1 + src/alloy/backend/x64/x64_code_cache_posix.cc | 1 + src/alloy/frontend/context_info.h | 1 + src/alloy/runtime/debug_info.cc | 2 +- src/alloy/runtime/debug_info.h | 1 + src/poly/logging.cc | 4 ++-- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/alloy/arena.h b/src/alloy/arena.h index d7b956001..764dd31bf 100644 --- a/src/alloy/arena.h +++ b/src/alloy/arena.h @@ -10,6 +10,7 @@ #ifndef ALLOY_ARENA_H_ #define ALLOY_ARENA_H_ +#include #include namespace alloy { diff --git a/src/alloy/backend/x64/x64_code_cache_posix.cc b/src/alloy/backend/x64/x64_code_cache_posix.cc index 0fa023ab5..c32990cd6 100644 --- a/src/alloy/backend/x64/x64_code_cache_posix.cc +++ b/src/alloy/backend/x64/x64_code_cache_posix.cc @@ -13,6 +13,7 @@ #include #include +#include namespace alloy { namespace backend { diff --git a/src/alloy/frontend/context_info.h b/src/alloy/frontend/context_info.h index 506b3572c..68cf52e18 100644 --- a/src/alloy/frontend/context_info.h +++ b/src/alloy/frontend/context_info.h @@ -10,6 +10,7 @@ #ifndef ALLOY_FRONTEND_CONTEXT_INFO_H_ #define ALLOY_FRONTEND_CONTEXT_INFO_H_ +#include #include namespace alloy { diff --git a/src/alloy/runtime/debug_info.cc b/src/alloy/runtime/debug_info.cc index 5abe39257..6a34e4238 100644 --- a/src/alloy/runtime/debug_info.cc +++ b/src/alloy/runtime/debug_info.cc @@ -9,7 +9,7 @@ #include -#include +#include namespace alloy { namespace runtime { diff --git a/src/alloy/runtime/debug_info.h b/src/alloy/runtime/debug_info.h index 6df923a69..4540deecf 100644 --- a/src/alloy/runtime/debug_info.h +++ b/src/alloy/runtime/debug_info.h @@ -10,6 +10,7 @@ #ifndef ALLOY_RUNTIME_DEBUG_INFO_H_ #define ALLOY_RUNTIME_DEBUG_INFO_H_ +#include #include namespace alloy { diff --git a/src/poly/logging.cc b/src/poly/logging.cc index dcd3aa32a..d7095d43c 100644 --- a/src/poly/logging.cc +++ b/src/poly/logging.cc @@ -79,7 +79,7 @@ void log_line(const char* file_path, const uint32_t line_number, #if 0 // defined(OutputDebugString) OutputDebugStringA(buffer); #else - fprintf(stdout, buffer); + fprintf(stdout, "%s", buffer); fflush(stdout); #endif // OutputDebugString if (!FLAGS_fast_stdout) { @@ -102,7 +102,7 @@ void handle_fatal(const char* file_path, const uint32_t line_number, #if defined(OutputDebugString) OutputDebugStringA(buffer); #else - fprintf(stderr, buffer); + fprintf(stderr, "%s", buffer); fflush(stderr); #endif // OutputDebugString if (!FLAGS_fast_stdout) {