aboutsummaryrefslogtreecommitdiff
path: root/third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp')
-rw-r--r--third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp b/third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp
index 0eeac23a5e..8909d9ef5e 100644
--- a/third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp
+++ b/third_party/vulkan-deps/glslang/src/glslang/ResourceLimits/resource_limits_c.cpp
@@ -42,28 +42,14 @@ const glslang_resource_t* glslang_default_resource(void)
return reinterpret_cast<const glslang_resource_t*>(GetDefaultResources());
}
-#if defined(__clang__) || defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#elif defined(_MSC_VER)
-#pragma warning(push)
-#pragma warning(disable : 4996)
-#endif
-
const char* glslang_default_resource_string()
{
std::string cpp_str = GetDefaultTBuiltInResourceString();
char* c_str = (char*)malloc(cpp_str.length() + 1);
- strcpy(c_str, cpp_str.c_str());
+ strncpy(c_str, cpp_str.c_str(), cpp_str.length() + 1);
return c_str;
}
-#if defined(__clang__) || defined(__GNUC__)
-#pragma GCC diagnostic pop
-#elif defined(_MSC_VER)
-#pragma warning(pop)
-#endif
-
void glslang_decode_resource_limits(glslang_resource_t* resources, char* config)
{
DecodeResourceLimits(reinterpret_cast<TBuiltInResource*>(resources), config);