build: Build everything using -Wpedantic

This commit is contained in:
WerWolv
2023-01-04 14:03:09 +01:00
parent 496b0ec41d
commit f7dd28002e
12 changed files with 56 additions and 35 deletions

View File

@@ -91,11 +91,11 @@ namespace hex::plugin::builtin {
case 0xFF:
ImGui::TextDisabled("##");
break;
case ' ' ... '~':
ImGui::Text(".%c", c);
break;
default:
ImGui::Text(getFormatString(upperCase), c);
if (c >= ' ' && c <= '~')
ImGui::Text(".%c", c);
else
ImGui::Text(getFormatString(upperCase), c);
break;
}
}

View File

@@ -415,11 +415,22 @@ namespace hex::plugin::builtin {
using enum SearchSettings::Value::Type;
using enum Occurrence::DecodeType;
case U8 ... U64: return Unsigned;
case I8 ... I64: return Signed;
case F32: return Float;
case F64: return Double;
default: return Binary;
case U8:
case U16:
case U32:
case U64:
return Unsigned;
case I8:
case I16:
case I32:
case I64:
return Signed;
case F32:
return Float;
case F64:
return Double;
default:
return Binary;
}
}();

View File

@@ -6,7 +6,12 @@
#include <hex/helpers/file.hpp>
#include <hex/helpers/fs.hpp>
// <yara/types.h>'s RE type has a zero-sized array, which is not allowed in ISO C++.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#include <yara.h>
#pragma GCC diagnostic pop
#include <filesystem>
#include <thread>