]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: fix build error in register_ns_ev_decoder if the sqlite3 is not enabled
authorShiju Jose <shiju.jose@huawei.com>
Tue, 9 Mar 2021 16:18:56 +0000 (16:18 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 26 May 2021 07:44:17 +0000 (09:44 +0200)
ns_ev_decoder->stmt_dec_record = NULL; in the register_ns_ev_decoder()
should be under #ifdef HAVE_SQLITE3 to fix the compilation error
when build without the configure option --enable-sqlite3.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
ras-non-standard-handler.c

index 84d3b1f89dbaea1bfd5067c2834b598a802dda7d..6ccf5bcbd1a8d801e6ad9bc4823a3df8fb4769cc 100644 (file)
@@ -74,7 +74,9 @@ int register_ns_ev_decoder(struct ras_ns_ev_decoder *ns_ev_decoder)
                return -1;
 
        ns_ev_decoder->next = NULL;
+#ifdef HAVE_SQLITE3
        ns_ev_decoder->stmt_dec_record = NULL;
+#endif
        if (!ras_ns_ev_dec_list) {
                ras_ns_ev_dec_list = ns_ev_decoder;
        } else {