From 924c3a5bf7700aad1d118212aecde20a3df0dbd0 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 22 Apr 2014 09:08:06 +0200 Subject: [PATCH] Make clang-analyze happy in two irrelevant cases. --- src/core/plugin.c | 2 ++ t/utils/channel_test.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/core/plugin.c b/src/core/plugin.c index 873e64a..a73faa0 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -455,6 +455,8 @@ module_load(const char *name, const sdb_plugin_ctx_t *plugin_ctx) int status; + assert(name); + base_name[0] = '\0'; name_ptr = name; diff --git a/t/utils/channel_test.c b/t/utils/channel_test.c index 02ed172..3827c07 100644 --- a/t/utils/channel_test.c +++ b/t/utils/channel_test.c @@ -138,6 +138,8 @@ START_TEST(test_write_read) data = 0xffffffff; check = sdb_channel_read(chan, &data); + fail_unless(check == 0, + "sdb_channel_read() = %d; expected: 0", check); /* result depends on endianess */ fail_unless((data == 0xffffff00) || (data == 0x00ffffff), "sdb_channel_read() returned data %x; " -- 2.30.2