Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-12-30 15:25:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-12-30 15:25:54 +0300
commit4145a4d08c0d2cede44af21f8fc4edc48cfc1051 (patch)
treeff8931f54e4f41882854f2bff3eaa5892100c963 /extern
parent6b7ead4fe808d6442fe7ae9b7f4ec38de8f35ee0 (diff)
GLog: Solve some compilation warnings
Those are actually sent to a pull-request, see https://github.com/google/glog/pull/81
Diffstat (limited to 'extern')
-rw-r--r--extern/libmv/third_party/glog/src/logging.cc8
-rw-r--r--extern/libmv/third_party/glog/src/symbolize.cc6
-rw-r--r--extern/libmv/third_party/glog/src/utilities.cc2
-rw-r--r--extern/libmv/third_party/glog/src/vlog_is_on.cc6
4 files changed, 14 insertions, 8 deletions
diff --git a/extern/libmv/third_party/glog/src/logging.cc b/extern/libmv/third_party/glog/src/logging.cc
index ec9eef1b83d..d700a0bf770 100644
--- a/extern/libmv/third_party/glog/src/logging.cc
+++ b/extern/libmv/third_party/glog/src/logging.cc
@@ -301,7 +301,7 @@ static GLogColor SeverityToColor(LogSeverity severity) {
#ifdef OS_WINDOWS
// Returns the character attribute for the given color.
-WORD GetColorAttribute(GLogColor color) {
+static WORD GetColorAttribute(GLogColor color) {
switch (color) {
case COLOR_RED: return FOREGROUND_RED;
case COLOR_GREEN: return FOREGROUND_GREEN;
@@ -313,7 +313,7 @@ WORD GetColorAttribute(GLogColor color) {
#else
// Returns the ANSI color code for the given color.
-const char* GetAnsiColorCode(GLogColor color) {
+static const char* GetAnsiColorCode(GLogColor color) {
switch (color) {
case COLOR_RED: return "1";
case COLOR_GREEN: return "2";
@@ -1677,7 +1677,7 @@ void LogToStderr() {
namespace base {
namespace internal {
-bool GetExitOnDFatal() {
+static bool GetExitOnDFatal() {
MutexLock l(&log_mutex);
return exit_on_dfatal;
}
@@ -1692,7 +1692,7 @@ bool GetExitOnDFatal() {
// and the stack trace is not recorded. The LOG(FATAL) *will* still
// exit the program. Since this function is used only in testing,
// these differences are acceptable.
-void SetExitOnDFatal(bool value) {
+static void SetExitOnDFatal(bool value) {
MutexLock l(&log_mutex);
exit_on_dfatal = value;
}
diff --git a/extern/libmv/third_party/glog/src/symbolize.cc b/extern/libmv/third_party/glog/src/symbolize.cc
index b25f7479d0d..6211e85e5db 100644
--- a/extern/libmv/third_party/glog/src/symbolize.cc
+++ b/extern/libmv/third_party/glog/src/symbolize.cc
@@ -634,7 +634,7 @@ OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc,
// bytes. Output will be truncated as needed, and a NUL character is always
// appended.
// NOTE: code from sandbox/linux/seccomp-bpf/demo.cc.
-char *itoa_r(intptr_t i, char *buf, size_t sz, int base, size_t padding) {
+static char *itoa_r(intptr_t i, char *buf, size_t sz, int base, size_t padding) {
// Make sure we can write at least one NUL byte.
size_t n = 1;
if (n > sz)
@@ -696,7 +696,7 @@ char *itoa_r(intptr_t i, char *buf, size_t sz, int base, size_t padding) {
// Safely appends string |source| to string |dest|. Never writes past the
// buffer size |dest_size| and guarantees that |dest| is null-terminated.
-void SafeAppendString(const char* source, char* dest, int dest_size) {
+static void SafeAppendString(const char* source, char* dest, int dest_size) {
int dest_string_length = strlen(dest);
SAFE_ASSERT(dest_string_length < dest_size);
dest += dest_string_length;
@@ -709,7 +709,7 @@ void SafeAppendString(const char* source, char* dest, int dest_size) {
// Converts a 64-bit value into a hex string, and safely appends it to |dest|.
// Never writes past the buffer size |dest_size| and guarantees that |dest| is
// null-terminated.
-void SafeAppendHexNumber(uint64_t value, char* dest, int dest_size) {
+static void SafeAppendHexNumber(uint64_t value, char* dest, int dest_size) {
// 64-bit numbers in hex can have up to 16 digits.
char buf[17] = {'\0'};
SafeAppendString(itoa_r(value, buf, sizeof(buf), 16, 0), dest, dest_size);
diff --git a/extern/libmv/third_party/glog/src/utilities.cc b/extern/libmv/third_party/glog/src/utilities.cc
index 5c88e58d3c0..296fa7a67f3 100644
--- a/extern/libmv/third_party/glog/src/utilities.cc
+++ b/extern/libmv/third_party/glog/src/utilities.cc
@@ -84,7 +84,7 @@ static void DebugWriteToStderr(const char* data, void *) {
}
}
-void DebugWriteToString(const char* data, void *arg) {
+static void DebugWriteToString(const char* data, void *arg) {
reinterpret_cast<string*>(arg)->append(data);
}
diff --git a/extern/libmv/third_party/glog/src/vlog_is_on.cc b/extern/libmv/third_party/glog/src/vlog_is_on.cc
index 4c95583b683..e8fdbae7dcb 100644
--- a/extern/libmv/third_party/glog/src/vlog_is_on.cc
+++ b/extern/libmv/third_party/glog/src/vlog_is_on.cc
@@ -62,6 +62,12 @@ _START_GOOGLE_NAMESPACE_
namespace glog_internal_namespace_ {
+// Used by logging_unittests.cc so can't make it static here.
+GOOGLE_GLOG_DLL_DECL bool SafeFNMatch_(const char* pattern,
+ size_t patt_len,
+ const char* str,
+ size_t str_len);
+
// Implementation of fnmatch that does not need 0-termination
// of arguments and does not allocate any memory,
// but we only support "*" and "?" wildcards, not the "[...]" patterns.