From a9153d9ce13c09e484983bb24cc73c05d892dd4e Mon Sep 17 00:00:00 2001 From: Rich Wareham Date: Sat, 4 Aug 2018 08:12:49 +0100 Subject: [PATCH] libs/image: fix structure-packing pragma warning When compiling with clang on Linux, the following warning is generated: ../../libs/image/src/ImageDecoder.cpp:487:13: warning: unterminated '#pragma pack (push, ...)' at end of file [-Wpragma-pack] #pragma pack(push, 1) ^ According to [1], the correct pragma to pop the packing state from the internal stack is "#pragma pack(pop)" rather than "#pragma pop()" which is used currently. This commit replaces "#pragma pop()" with "#pragma pack(pop)". [1] http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gcc/Structure_002dPacking-Pragmas.html --- libs/image/src/ImageDecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/image/src/ImageDecoder.cpp b/libs/image/src/ImageDecoder.cpp index e445a4dede..d90092b628 100644 --- a/libs/image/src/ImageDecoder.cpp +++ b/libs/image/src/ImageDecoder.cpp @@ -496,7 +496,7 @@ Image PSDDecoder::decode() { uint16_t depth; uint16_t mode; }; - #pragma pop() + #pragma pack(pop) static const uint16_t kColorModeRGB = 3; static const uint16_t kCompressionRAW = 0;