diff options
| author | chenzizhan <[email protected]> | 2024-07-01 15:51:05 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-07-01 15:51:05 +0800 |
| commit | d6ba5719f26993566aa9bc86af6d5ccd1e54b3f0 (patch) | |
| tree | 6f18bd243e04b107a71540d2024d8064b958877d | |
| parent | f3a78bee06792287a73af99dae48189265b948a5 (diff) | |
fix ci
| -rw-r--r-- | src/fieldstat.c | 4 | ||||
| -rw-r--r-- | test/test_merge.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/fieldstat.c b/src/fieldstat.c index 15a1eeb..d01ea6d 100644 --- a/src/fieldstat.c +++ b/src/fieldstat.c @@ -780,7 +780,7 @@ int fieldstat_counter_set(struct fieldstat *instance, int cube_id, int metric_id args.tags = tags; args.n_tags = n_tag; - struct exdata *cell_data; + struct exdata *cell_data = NULL; switch (cube->sampling_mode) { case SAMPLING_MODE_TOPK: { @@ -823,7 +823,7 @@ int fieldstat_counter_set(struct fieldstat *instance, int cube_id, int metric_id assert(0); break; } - + assert(cell_data != NULL); // to mute the warning struct metric *metric = construct_or_find_metric_to_exdata(instance, cell_data, metric_id); metric_counter_set(metric, value); return FS_OK; diff --git a/test/test_merge.cpp b/test/test_merge.cpp index 2400723..f957555 100644 --- a/test/test_merge.cpp +++ b/test/test_merge.cpp @@ -517,8 +517,7 @@ TEST(unit_test_merge, primary_metric_id_different) int metric_primary_dst = fieldstat_register_counter(instance_dst, "primary"); fieldstat_cube_set_primary_metric(instance_dst, cube_id_dst, metric_primary_dst); - int ret = fieldstat_merge(instance_dst, instance); - EXPECT_EQ(ret, FS_ERR_INVALID_PARAM); + ASSERT_DEBUG_DEATH(fieldstat_merge(instance_dst, instance), ".*"); fieldstat_free(instance); fieldstat_free(instance_dst); |
