Ticket #2996: 0006-Make-gcc-happy.patch
File 0006-Make-gcc-happy.patch, 11.6 KB (added by , 9 years ago) |
---|
-
source/lib/debug.cpp
From 0ad3359ed2eb3f1bcc3d9a19ef5b6e3bcf1e3521 Mon Sep 17 00:00:00 2001 From: BogDan Vatra <bogdan@kde.org> Date: Tue, 27 Jan 2015 14:27:28 +0200 Subject: [PATCH 6/6] Make gcc happy. --- source/lib/debug.cpp | 20 +++++----- source/lib/file/archive/archive.cpp | 4 +- source/lib/file/vfs/vfs.cpp | 6 +-- source/lib/path.cpp | 8 ++-- source/lib/res/h_mgr.cpp | 10 ++--- source/lib/secure_crt.inl | 2 +- source/lib/status.cpp | 76 ++++++++++++++++++------------------- source/lib/tex/tex.cpp | 16 ++++---- source/lib/utf8.cpp | 8 ++-- 9 files changed, 75 insertions(+), 75 deletions(-) diff --git a/source/lib/debug.cpp b/source/lib/debug.cpp index 35102c3..d95a55e 100644
a b 43 43 #endif 44 44 45 45 static const StatusDefinition debugStatusDefinitions[] = { 46 { ERR::SYM_NO_STACK_FRAMES_FOUND, L"No stack frames found" },47 { ERR::SYM_UNRETRIEVABLE_STATIC, L"Value unretrievable (stored in external module)" },48 { ERR::SYM_UNRETRIEVABLE, L"Value unretrievable" },49 { ERR::SYM_TYPE_INFO_UNAVAILABLE, L"Error getting type_info" },50 { ERR::SYM_INTERNAL_ERROR, L"Exception raised while processing a symbol" },51 { ERR::SYM_UNSUPPORTED, L"Symbol type not (fully) supported" },52 { ERR::SYM_CHILD_NOT_FOUND, L"Symbol does not have the given child" },53 { ERR::SYM_NESTING_LIMIT, L"Symbol nesting too deep or infinite recursion" },54 { ERR::SYM_SINGLE_SYMBOL_LIMIT, L"Symbol has produced too much output" },55 { INFO::SYM_SUPPRESS_OUTPUT, L"Symbol was suppressed" }46 { ERR::SYM_NO_STACK_FRAMES_FOUND, L"No stack frames found", 0 }, 47 { ERR::SYM_UNRETRIEVABLE_STATIC, L"Value unretrievable (stored in external module)", 0 }, 48 { ERR::SYM_UNRETRIEVABLE, L"Value unretrievable", 0 }, 49 { ERR::SYM_TYPE_INFO_UNAVAILABLE, L"Error getting type_info", 0 }, 50 { ERR::SYM_INTERNAL_ERROR, L"Exception raised while processing a symbol", 0 }, 51 { ERR::SYM_UNSUPPORTED, L"Symbol type not (fully) supported", 0 }, 52 { ERR::SYM_CHILD_NOT_FOUND, L"Symbol does not have the given child", 0 }, 53 { ERR::SYM_NESTING_LIMIT, L"Symbol nesting too deep or infinite recursion", 0 }, 54 { ERR::SYM_SINGLE_SYMBOL_LIMIT, L"Symbol has produced too much output", 0 }, 55 { INFO::SYM_SUPPRESS_OUTPUT, L"Symbol was suppressed", 0 } 56 56 }; 57 57 STATUS_ADD_DEFINITIONS(debugStatusDefinitions); 58 58 -
source/lib/file/archive/archive.cpp
diff --git a/source/lib/file/archive/archive.cpp b/source/lib/file/archive/archive.cpp index fc14027..f3e47a0 100644
a b 28 28 #include "lib/file/archive/archive.h" 29 29 30 30 static const StatusDefinition archiveStatusDefinitions[] = { 31 { ERR::ARCHIVE_UNKNOWN_FORMAT, L"Unknown archive format" },32 { ERR::ARCHIVE_UNKNOWN_METHOD, L"Unknown compression method" }31 { ERR::ARCHIVE_UNKNOWN_FORMAT, L"Unknown archive format", 0 }, 32 { ERR::ARCHIVE_UNKNOWN_METHOD, L"Unknown compression method", 0 } 33 33 }; 34 34 STATUS_ADD_DEFINITIONS(archiveStatusDefinitions); 35 35 -
source/lib/file/vfs/vfs.cpp
diff --git a/source/lib/file/vfs/vfs.cpp b/source/lib/file/vfs/vfs.cpp index 09be9e7..3c492a5 100644
a b 36 36 #include "lib/file/vfs/file_cache.h" 37 37 38 38 static const StatusDefinition vfsStatusDefinitions[] = { 39 { ERR::VFS_DIR_NOT_FOUND, L"VFS directory not found" },40 { ERR::VFS_FILE_NOT_FOUND, L"VFS file not found" },41 { ERR::VFS_ALREADY_MOUNTED, L"VFS path already mounted" }39 { ERR::VFS_DIR_NOT_FOUND, L"VFS directory not found", 0 }, 40 { ERR::VFS_FILE_NOT_FOUND, L"VFS file not found", 0 }, 41 { ERR::VFS_ALREADY_MOUNTED, L"VFS path already mounted", 0 } 42 42 }; 43 43 STATUS_ADD_DEFINITIONS(vfsStatusDefinitions); 44 44 -
source/lib/path.cpp
diff --git a/source/lib/path.cpp b/source/lib/path.cpp index d4056e1..1c1c44c 100644
a b 31 31 #include <cerrno> 32 32 33 33 static const StatusDefinition pathStatusDefinitions[] = { 34 { ERR::PATH_CHARACTER_ILLEGAL, L"illegal path character" },35 { ERR::PATH_CHARACTER_UNSAFE, L"unsafe path character" },36 { ERR::PATH_NOT_FOUND, L"path not found" },37 { ERR::PATH_MIXED_SEPARATORS, L"path contains both slash and backslash separators" }34 { ERR::PATH_CHARACTER_ILLEGAL, L"illegal path character", 0 }, 35 { ERR::PATH_CHARACTER_UNSAFE, L"unsafe path character", 0 }, 36 { ERR::PATH_NOT_FOUND, L"path not found", 0 }, 37 { ERR::PATH_MIXED_SEPARATORS, L"path contains both slash and backslash separators", 0 } 38 38 }; 39 39 STATUS_ADD_DEFINITIONS(pathStatusDefinitions); 40 40 -
source/lib/res/h_mgr.cpp
diff --git a/source/lib/res/h_mgr.cpp b/source/lib/res/h_mgr.cpp index ffae058..8e5bc26 100644
a b static const Status H_TYPE_MISMATCH = -120004; 49 49 static const Status H_ALREADY_FREED = -120005; 50 50 } 51 51 static const StatusDefinition hStatusDefinitions[] = { 52 { ERR::H_IDX_INVALID, L"Handle index completely out of bounds" },53 { ERR::H_IDX_UNUSED, L"Handle index exceeds high-water mark" },54 { ERR::H_TAG_MISMATCH, L"Handle tag mismatch (stale reference?)" },55 { ERR::H_TYPE_MISMATCH, L"Handle type mismatch" },56 { ERR::H_ALREADY_FREED, L"Handle already freed" }52 { ERR::H_IDX_INVALID, L"Handle index completely out of bounds", 0 }, 53 { ERR::H_IDX_UNUSED, L"Handle index exceeds high-water mark", 0 }, 54 { ERR::H_TAG_MISMATCH, L"Handle tag mismatch (stale reference?)", 0 }, 55 { ERR::H_TYPE_MISMATCH, L"Handle type mismatch", 0 }, 56 { ERR::H_ALREADY_FREED, L"Handle already freed", 0 } 57 57 }; 58 58 STATUS_ADD_DEFINITIONS(hStatusDefinitions); 59 59 -
source/lib/secure_crt.inl
diff --git a/source/lib/secure_crt.inl b/source/lib/secure_crt.inl index 861c189..5a9360c 100644
a b 40 40 // must only be done once. 41 41 #ifndef WSECURE_CRT 42 42 static const StatusDefinition secureCrtStatusDefinitions[] = { 43 { ERR::STRING_NOT_TERMINATED, L"Invalid string (no 0 terminator found in buffer)"}43 { ERR::STRING_NOT_TERMINATED, L"Invalid string (no 0 terminator found in buffer)", 0 } 44 44 }; 45 45 STATUS_ADD_DEFINITIONS(secureCrtStatusDefinitions); 46 46 #endif -
source/lib/status.cpp
diff --git a/source/lib/status.cpp b/source/lib/status.cpp index f1b814f..81e70d4 100644
a b static const StatusDefinition statusDefs[] = { 117 117 118 118 // INFO::OK doesn't really need a string because calling StatusDescription(0) 119 119 // should never happen, but we'll play it safe. 120 { INFO::OK, L"No error reported here" },121 { ERR::FAIL, L"Function failed (no details available)" },120 { INFO::OK, L"No error reported here", 0 }, 121 { ERR::FAIL, L"Function failed (no details available)", 0 }, 122 122 123 { INFO::SKIPPED, L"Skipped (not an error)" },124 { INFO::CANNOT_HANDLE, L"Cannot handle (not an error)" },125 { INFO::ALL_COMPLETE, L"All complete (not an error)" },123 { INFO::SKIPPED, L"Skipped (not an error)", 0 }, 124 { INFO::CANNOT_HANDLE, L"Cannot handle (not an error)", 0 }, 125 { INFO::ALL_COMPLETE, L"All complete (not an error)", 0 }, 126 126 127 { ERR::LOGIC, L"Logic error in code" },128 { ERR::EXCEPTION, L"Caught an exception" },129 { ERR::TIMED_OUT, L"Timed out" },130 { ERR::REENTERED, L"Single-call function was reentered" },131 { ERR::CORRUPTED, L"File/memory data is corrupted" },132 { ERR::ABORTED, L"Operation aborted" },127 { ERR::LOGIC, L"Logic error in code", 0 }, 128 { ERR::EXCEPTION, L"Caught an exception", 0 }, 129 { ERR::TIMED_OUT, L"Timed out", 0 }, 130 { ERR::REENTERED, L"Single-call function was reentered", 0 }, 131 { ERR::CORRUPTED, L"File/memory data is corrupted", 0 }, 132 { ERR::ABORTED, L"Operation aborted", 0 }, 133 133 134 134 { ERR::INVALID_ALIGNMENT, L"Invalid alignment", EINVAL }, 135 135 { ERR::INVALID_OFFSET, L"Invalid offset", EINVAL }, … … static const StatusDefinition statusDefs[] = { 145 145 { ERR::NOT_SUPPORTED, L"Function not supported", ENOSYS }, 146 146 { ERR::NO_MEM, L"Not enough memory", ENOMEM}, 147 147 148 { ERR::_1, L"Case 1" },149 { ERR::_2, L"Case 2" },150 { ERR::_3, L"Case 3" },151 { ERR::_4, L"Case 4" },152 { ERR::_5, L"Case 5" },153 { ERR::_6, L"Case 6" },154 { ERR::_7, L"Case 7" },155 { ERR::_8, L"Case 8" },156 { ERR::_9, L"Case 9" },157 { ERR::_11, L"Case 11" },158 { ERR::_12, L"Case 12" },159 { ERR::_13, L"Case 13" },160 { ERR::_14, L"Case 14" },161 { ERR::_15, L"Case 15" },162 { ERR::_16, L"Case 16" },163 { ERR::_17, L"Case 17" },164 { ERR::_18, L"Case 18" },165 { ERR::_19, L"Case 19" },166 { ERR::_21, L"Case 21" },167 { ERR::_22, L"Case 22" },168 { ERR::_23, L"Case 23" },169 { ERR::_24, L"Case 24" },170 { ERR::_25, L"Case 25" },171 { ERR::_26, L"Case 26" },172 { ERR::_27, L"Case 27" },173 { ERR::_28, L"Case 28" },174 { ERR::_29, L"Case 29" }148 { ERR::_1, L"Case 1", 0 }, 149 { ERR::_2, L"Case 2", 0 }, 150 { ERR::_3, L"Case 3", 0 }, 151 { ERR::_4, L"Case 4", 0 }, 152 { ERR::_5, L"Case 5", 0 }, 153 { ERR::_6, L"Case 6", 0 }, 154 { ERR::_7, L"Case 7", 0 }, 155 { ERR::_8, L"Case 8", 0 }, 156 { ERR::_9, L"Case 9", 0 }, 157 { ERR::_11, L"Case 11", 0 }, 158 { ERR::_12, L"Case 12", 0 }, 159 { ERR::_13, L"Case 13", 0 }, 160 { ERR::_14, L"Case 14", 0 }, 161 { ERR::_15, L"Case 15", 0 }, 162 { ERR::_16, L"Case 16", 0 }, 163 { ERR::_17, L"Case 17", 0 }, 164 { ERR::_18, L"Case 18", 0 }, 165 { ERR::_19, L"Case 19", 0 }, 166 { ERR::_21, L"Case 21", 0 }, 167 { ERR::_22, L"Case 22", 0 }, 168 { ERR::_23, L"Case 23", 0 }, 169 { ERR::_24, L"Case 24", 0 }, 170 { ERR::_25, L"Case 25", 0 }, 171 { ERR::_26, L"Case 26", 0 }, 172 { ERR::_27, L"Case 27", 0 }, 173 { ERR::_28, L"Case 28", 0 }, 174 { ERR::_29, L"Case 29", 0 } 175 175 176 176 }; 177 177 STATUS_ADD_DEFINITIONS(statusDefs); -
source/lib/tex/tex.cpp
diff --git a/source/lib/tex/tex.cpp b/source/lib/tex/tex.cpp index 57ed5e5..158b391 100644
a b 40 40 41 41 42 42 static const StatusDefinition texStatusDefinitions[] = { 43 { ERR::TEX_FMT_INVALID, L"Invalid/unsupported texture format" },44 { ERR::TEX_INVALID_COLOR_TYPE, L"Invalid color type" },45 { ERR::TEX_NOT_8BIT_PRECISION, L"Not 8-bit channel precision" },46 { ERR::TEX_INVALID_LAYOUT, L"Unsupported texel layout, e.g. right-to-left" },47 { ERR::TEX_COMPRESSED, L"Unsupported texture compression" },48 { WARN::TEX_INVALID_DATA, L"Warning: invalid texel data encountered" },49 { ERR::TEX_INVALID_SIZE, L"Texture size is incorrect" },50 { INFO::TEX_CODEC_CANNOT_HANDLE, L"Texture codec cannot handle the given format" }43 { ERR::TEX_FMT_INVALID, L"Invalid/unsupported texture format", 0 }, 44 { ERR::TEX_INVALID_COLOR_TYPE, L"Invalid color type", 0 }, 45 { ERR::TEX_NOT_8BIT_PRECISION, L"Not 8-bit channel precision", 0 }, 46 { ERR::TEX_INVALID_LAYOUT, L"Unsupported texel layout, e.g. right-to-left", 0 }, 47 { ERR::TEX_COMPRESSED, L"Unsupported texture compression", 0 }, 48 { WARN::TEX_INVALID_DATA, L"Warning: invalid texel data encountered", 0 }, 49 { ERR::TEX_INVALID_SIZE, L"Texture size is incorrect", 0 }, 50 { INFO::TEX_CODEC_CANNOT_HANDLE, L"Texture codec cannot handle the given format", 0 } 51 51 }; 52 52 STATUS_ADD_DEFINITIONS(texStatusDefinitions); 53 53 -
source/lib/utf8.cpp
diff --git a/source/lib/utf8.cpp b/source/lib/utf8.cpp index 31f5c65..7f55ff2 100644
a b 24 24 #include "lib/utf8.h" 25 25 26 26 static const StatusDefinition utf8StatusDefinitions[] = { 27 { ERR::UTF8_SURROGATE, L"UTF-16 surrogate pairs aren't supported" },28 { ERR::UTF8_OUTSIDE_BMP, L"Code point outside BMP (> 0x10000)" },29 { ERR::UTF8_NONCHARACTER, L"Noncharacter (e.g. WEOF)" },30 { ERR::UTF8_INVALID_UTF8, L"Invalid UTF-8 sequence" }27 { ERR::UTF8_SURROGATE, L"UTF-16 surrogate pairs aren't supported", 0 }, 28 { ERR::UTF8_OUTSIDE_BMP, L"Code point outside BMP (> 0x10000)", 0 }, 29 { ERR::UTF8_NONCHARACTER, L"Noncharacter (e.g. WEOF)", 0 }, 30 { ERR::UTF8_INVALID_UTF8, L"Invalid UTF-8 sequence", 0 } 31 31 }; 32 32 STATUS_ADD_DEFINITIONS(utf8StatusDefinitions); 33 33