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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-03-21 05:58:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-21 06:00:40 +0300
commit6d97f9a5c1c77d30b4a1939ad81708a44f225280 (patch)
treed80b7a142002751e63a4a59c61219f7f5dc5791f /source/blender
parent4abafa20621ecacb2ad4ba5d44a35959a1f4c6b8 (diff)
Cleanup: use static local variables
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/icons.cc2
-rw-r--r--source/blender/blenlib/intern/BLI_mmap.c2
-rw-r--r--source/blender/blenlib/tests/BLI_string_utf8_test.cc2
-rw-r--r--source/blender/editors/animation/keyframes_general.c1
-rw-r--r--source/blender/functions/tests/FN_cpp_type_test.cc2
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c5
6 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc
index afb009b66cd..7e9f81f9c83 100644
--- a/source/blender/blenkernel/intern/icons.cc
+++ b/source/blender/blenkernel/intern/icons.cc
@@ -86,7 +86,7 @@ static int gNextIconId = 1;
/* Protected by gIconMutex. */
static int gFirstIconId = 1;
-std::mutex gIconMutex;
+static std::mutex gIconMutex;
/* Not mutex-protected! */
static GHash *gCachedPreviews = nullptr;
diff --git a/source/blender/blenlib/intern/BLI_mmap.c b/source/blender/blenlib/intern/BLI_mmap.c
index 2fd162de22c..71510b62ba1 100644
--- a/source/blender/blenlib/intern/BLI_mmap.c
+++ b/source/blender/blenlib/intern/BLI_mmap.c
@@ -67,7 +67,7 @@ struct BLI_mmap_file {
* handler if one was configured and abort the process otherwise.
*/
-struct error_handler_data {
+static struct error_handler_data {
ListBase open_mmaps;
char configured;
void (*next_handler)(int, siginfo_t *, void *);
diff --git a/source/blender/blenlib/tests/BLI_string_utf8_test.cc b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
index 1833945b3fd..2796cbbfbda 100644
--- a/source/blender/blenlib/tests/BLI_string_utf8_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
@@ -22,7 +22,7 @@
* Based on utf-8 decoder stress-test (https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
* by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
*/
-const char *utf8_invalid_tests[][3] = {
+static const char *utf8_invalid_tests[][3] = {
/* 1 Some correct UTF-8 text. */
{"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |",
"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |", "\x00"},
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 72e65272f13..87291974e08 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -44,6 +44,7 @@
#include "BKE_report.h"
#include "RNA_access.h"
+#include "RNA_enum_types.h"
#include "ED_anim_api.h"
#include "ED_keyframes_edit.h"
diff --git a/source/blender/functions/tests/FN_cpp_type_test.cc b/source/blender/functions/tests/FN_cpp_type_test.cc
index 29368b251cc..479526b5e3a 100644
--- a/source/blender/functions/tests/FN_cpp_type_test.cc
+++ b/source/blender/functions/tests/FN_cpp_type_test.cc
@@ -79,7 +79,7 @@ MAKE_CPP_TYPE(TestType, blender::fn::tests::TestType)
namespace blender::fn::tests {
-const CPPType &CPPType_TestType = CPPType::get<TestType>();
+static const CPPType &CPPType_TestType = CPPType::get<TestType>();
TEST(cpp_type, Size)
{
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index cc42c89a60e..fae8ac72108 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -77,9 +77,9 @@
#endif
#ifdef WITH_GMP
-const bool bypass_bmesh = true;
+static const bool bypass_bmesh = true;
#else
-const bool bypass_bmesh = false;
+static const bool bypass_bmesh = false;
#endif
static void initData(ModifierData *md)
@@ -729,6 +729,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
return exact_boolean_mesh(bmd, ctx, mesh);
}
#else
+ UNUSED_VARS(bypass_bmesh);
const bool use_exact = false;
#endif