Remove various warning suppression pragmas

This requires a small change to to use strncpy() instead of strcpy(),
as well as change of include paths to not use "..". The other warnings
are just not being hit anymore.
This commit is contained in:
Arcady Goldmints-Orlov 2023-11-30 10:50:12 -05:00 committed by arcady-lunarg
parent a1138bacff
commit e854c8de10
5 changed files with 1476 additions and 1514 deletions

View file

@ -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);