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:
authorSergey Sharybin <sergey@blender.org>2022-03-16 12:57:19 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-18 14:07:08 +0300
commitc3ecfdf40b02f7d12775f1ded2f039d40f1470bb (patch)
tree1819bfb4c77444a82adfc79a7dbbfd5f2679e62e /source/blender/gpu
parent2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6 (diff)
Cleanup: Compilation warnings
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_shader_dependency.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index 5b7df035acd..59481b514eb 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -8,6 +8,7 @@
* shader files.
*/
+#include <iomanip>
#include <iostream>
#include "BLI_map.hh"
@@ -136,15 +137,14 @@ struct GPUSource {
int64_t line_end = input.find("\n", offset);
int64_t line_start = input.rfind("\n", offset) + 1;
int64_t char_number = offset - line_start + 1;
- char line_prefix[16] = "";
- SNPRINTF(line_prefix, "%5ld | ", line_number);
/* TODO Use clog. */
std::cout << fullpath << ":" << line_number << ":" << char_number;
std::cout << " error: " << message << "\n";
- std::cout << line_prefix << input.substr(line_start, line_end - line_start) << "\n";
+ std::cout << std::setw(5) << line_number << " | "
+ << input.substr(line_start, line_end - line_start) << "\n";
std::cout << " | ";
for (int64_t i = 0; i < char_number - 1; i++) {
std::cout << " ";
@@ -361,6 +361,7 @@ void gpu_shader_dependency_init()
errors += value->init_dependencies(*g_sources);
}
BLI_assert_msg(errors == 0, "Dependency errors detected: Aborting");
+ UNUSED_VARS_NDEBUG(errors);
}
void gpu_shader_dependency_exit()