summaryrefslogtreecommitdiff
path: root/modules/dds
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-07-02 13:23:31 +0200
committerMartin Liska <mliska@suse.cz>2019-07-02 13:35:30 +0200
commitf48bb8fac8f6036c0077bb53a5ae37bb03832e7b (patch)
tree8cbeaa8f3ec9315b302f0410d20b2be2af1cc9dc /modules/dds
parent266dc732baea350bc5bed40c69eb27cfdce5f782 (diff)
Fix few GCC9 warnings:
thirdparty/assimp/include/assimp/material.inl: In member function 'aiReturn aiMaterial::Get(const char*, unsigned int, unsigned int, aiColor3D&) const': thirdparty/assimp/include/assimp/material.inl:176:33: error: implicitly-declared 'aiColor3D& aiColor3D::operator=(const aiColor3D&)' is deprecated [-Werror=deprecated-copy] 176 | pOut = aiColor3D(c.r,c.g,c.b); modules/dds/texture_loader_dds.cpp:167:50: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 167 | if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("DXT1")) { | ^ [ 28%] modules/dds/texture_loader_dds.cpp:170:57: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 170 | } else if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("DXT3")) { | ^ modules/dds/texture_loader_dds.cpp:174:57: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 174 | } else if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("DXT5")) { | ^ modules/dds/texture_loader_dds.cpp:177:57: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 177 | } else if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("ATI1")) { | ^ modules/dds/texture_loader_dds.cpp:180:57: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 180 | } else if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("ATI2")) { | ^ modules/dds/texture_loader_dds.cpp:183:57: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare] 183 | } else if (format_flags & DDPF_FOURCC && format_fourcc == PF_FOURCC("A2XY")) { | ^ thirdparty/assimp/include/assimp/material.inl: In member function 'aiReturn aiMaterial::Get(const char*, unsigned int, unsigned int, aiColor3D&) const': thirdparty/assimp/include/assimp/material.inl:176:33: error: implicitly-declared 'aiColor3D& aiColor3D::operator=(const aiColor3D&)' is deprecated [-Werror=deprecated-copy] 176 | pOut = aiColor3D(c.r,c.g,c.b);
Diffstat (limited to 'modules/dds')
-rw-r--r--modules/dds/texture_loader_dds.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 50fdc8ab20..197b41b30c 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -31,7 +31,7 @@
#include "texture_loader_dds.h"
#include "core/os/file_access.h"
-#define PF_FOURCC(s) (((s)[3] << 24U) | ((s)[2] << 16U) | ((s)[1] << 8U) | ((s)[0]))
+#define PF_FOURCC(s) ((uint32_t)(((s)[3] << 24U) | ((s)[2] << 16U) | ((s)[1] << 8U) | ((s)[0])))
enum {
DDS_MAGIC = 0x20534444,