Code

Make clang-analyze happy in two irrelevant cases.
authorSebastian Harl <sh@tokkee.org>
Tue, 22 Apr 2014 07:08:06 +0000 (09:08 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 22 Apr 2014 07:08:06 +0000 (09:08 +0200)
src/core/plugin.c
t/utils/channel_test.c

index 873e64a19436903c379bff983565c825008f2a43..a73faa04f726a3353ea788548493078279dcfb30 100644 (file)
@@ -455,6 +455,8 @@ module_load(const char *name, const sdb_plugin_ctx_t *plugin_ctx)
 
        int status;
 
 
        int status;
 
+       assert(name);
+
        base_name[0] = '\0';
        name_ptr = name;
 
        base_name[0] = '\0';
        name_ptr = name;
 
index 02ed172a42ace53f1090e2b18379246681fe6774..3827c0705f7f78efa3cc77da6fc2bb526f1b6e32 100644 (file)
@@ -138,6 +138,8 @@ START_TEST(test_write_read)
 
        data = 0xffffffff;
        check = sdb_channel_read(chan, &data);
 
        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; "
        /* result depends on endianess */
        fail_unless((data == 0xffffff00) || (data == 0x00ffffff),
                        "sdb_channel_read() returned data %x; "