mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00:00
clear all warnings and enable -Werror
This commit is contained in:
parent
9fced15433
commit
06aa3e3d40
@ -36,8 +36,8 @@ constexpr auto outputEnvKey = "OID_METRICS_OUTPUT";
|
||||
* "oid_metrics.json".
|
||||
*/
|
||||
struct TraceFlags {
|
||||
bool time : 1 = false;
|
||||
bool rss : 1 = false;
|
||||
bool time = false;
|
||||
bool rss = false;
|
||||
|
||||
operator bool() const {
|
||||
return time || rss;
|
||||
|
@ -2,9 +2,16 @@ definitions = '''
|
||||
struct Foo10 {
|
||||
int arr[10];
|
||||
};
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wzero-length-array"
|
||||
struct Foo0 {
|
||||
int arr[0];
|
||||
};
|
||||
|
||||
using ZeroLengthIntArray = int[0];
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
struct MultiDim {
|
||||
int arr[2][3];
|
||||
};
|
||||
@ -59,7 +66,7 @@ definitions = '''
|
||||
# WARNING: zero-length arrays are handled differently to non-empty arrays.
|
||||
# They end up not being treated as containers. This should probably change
|
||||
# in the future.
|
||||
param_types = ["int[0]"]
|
||||
param_types = ["ZeroLengthIntArray"]
|
||||
setup = "return {};"
|
||||
expect_json = '[{"staticSize":0, "dynamicSize":0}]'
|
||||
[cases.ref_int10]
|
||||
@ -72,6 +79,6 @@ definitions = '''
|
||||
# WARNING: zero-length arrays are handled differently to non-empty arrays.
|
||||
# They end up not being treated as containers. This should probably change
|
||||
# in the future.
|
||||
param_types = ["const int(&)[0]"]
|
||||
param_types = ["const ZeroLengthIntArray&"]
|
||||
setup = "return {};"
|
||||
expect_json = '[{"staticSize":0, "dynamicSize":0}]'
|
||||
|
@ -56,7 +56,10 @@ def add_test_setup(f, config):
|
||||
f"\n"
|
||||
f'{config.get("raw_definitions", "")}\n'
|
||||
f"namespace {ns} {{\n"
|
||||
f"#pragma clang diagnostic push\n"
|
||||
f"#pragma clang diagnostic ignored \"-Wunused-private-field\"\n"
|
||||
f'{config.get("definitions", "")}\n'
|
||||
f"#pragma clang diagnostic pop\n"
|
||||
)
|
||||
|
||||
# fmt: on
|
||||
|
Loading…
Reference in New Issue
Block a user