diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 9e267a36ccf..543bba020e2 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -169,10 +169,11 @@ void RotatedFileLogger::rotate_file() { if (FileAccess::exists(base_path)) { if (max_files > 1) { - char timestamp[21]; + const size_t TIMESTAMP_SIZE = 21; + char timestamp[TIMESTAMP_SIZE]; OS::Date date = OS::get_singleton()->get_date(); OS::Time time = OS::get_singleton()->get_time(); - sprintf(timestamp, "_%04d-%02d-%02d_%02d.%02d.%02d", date.year, date.month, date.day, time.hour, time.min, time.sec); + snprintf(timestamp, TIMESTAMP_SIZE, "_%04d-%02d-%02d_%02d.%02d.%02d", date.year, date.month, date.day, time.hour, time.min, time.sec); String backup_name = base_path.get_basename() + timestamp; if (base_path.get_extension() != String()) { diff --git a/modules/bullet/bullet_types_converter.h b/modules/bullet/bullet_types_converter.h index 7ffb09b8bab..fbfb08a4e39 100644 --- a/modules/bullet/bullet_types_converter.h +++ b/modules/bullet/bullet_types_converter.h @@ -36,10 +36,19 @@ #include "core/math/vector3.h" #include "core/typedefs.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include #include #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/collision_object_bullet.h b/modules/bullet/collision_object_bullet.h index dd1c8e3d2ea..8bf042a5c3d 100644 --- a/modules/bullet/collision_object_bullet.h +++ b/modules/bullet/collision_object_bullet.h @@ -37,8 +37,17 @@ #include "core/vset.h" #include "shape_owner_bullet.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/constraint_bullet.h b/modules/bullet/constraint_bullet.h index 68c2ebe9e6b..74861e944db 100644 --- a/modules/bullet/constraint_bullet.h +++ b/modules/bullet/constraint_bullet.h @@ -34,8 +34,17 @@ #include "bullet_utilities.h" #include "rid_bullet.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/godot_collision_dispatcher.h b/modules/bullet/godot_collision_dispatcher.h index 4e5c6937c18..93843a9bd15 100644 --- a/modules/bullet/godot_collision_dispatcher.h +++ b/modules/bullet/godot_collision_dispatcher.h @@ -33,8 +33,17 @@ #include "core/int_types.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/godot_ray_world_algorithm.h b/modules/bullet/godot_ray_world_algorithm.h index c81e1107c82..28ac82a4047 100644 --- a/modules/bullet/godot_ray_world_algorithm.h +++ b/modules/bullet/godot_ray_world_algorithm.h @@ -31,10 +31,19 @@ #ifndef GODOT_RAY_WORLD_ALGORITHM_H #define GODOT_RAY_WORLD_ALGORITHM_H +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include #include #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h index 976a035aabc..e6a09330462 100644 --- a/modules/bullet/godot_result_callbacks.h +++ b/modules/bullet/godot_result_callbacks.h @@ -33,9 +33,18 @@ #include "servers/physics_server.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */ diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h index 233df761b86..cb41a31ee13 100644 --- a/modules/bullet/shape_bullet.h +++ b/modules/bullet/shape_bullet.h @@ -36,10 +36,19 @@ #include "rid_bullet.h" #include "servers/physics_server.h" +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-copy-with-user-provided-copy" +#endif + #include #include #include +#if defined(__clang__) && (__clang_major__ >= 13) +#pragma clang diagnostic pop +#endif + /** @author AndreaCatania */