Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v4 6/6] sql: VDBE tests for trigger existence
Date: Tue, 26 Jun 2018 17:49:36 +0300	[thread overview]
Message-ID: <52850DD4-F038-476E-B565-01AF0B7F87EB@tarantool.org> (raw)
In-Reply-To: <a9c518e7-8925-8eca-c768-8b5d3bb5d9cf@tarantool.org>

I have noticed, that in DEBUG mode there are a lot of compile errors:

/Users/n.pettik/tarantool/src/box/sql/trigger.c:102:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (sqlite3FixSrcList(&fixdb, table) != 0)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here
        sqlite3DbFree(db, trigger_name);
                          ^~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:102:2: note: remove the 'if' if its condition is always false
        if (sqlite3FixSrcList(&fixdb, table) != 0)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:98:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (db->mallocFailed)
            ^~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here
        sqlite3DbFree(db, trigger_name);
                          ^~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:98:2: note: remove the 'if' if its condition is always false
        if (db->mallocFailed)
        ^~~~~~~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:91:6: error: variable 'trigger_name' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (table == NULL || db->mallocFailed)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here
        sqlite3DbFree(db, trigger_name);
                          ^~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:91:2: note: remove the 'if' if its condition is always false
        if (table == NULL || db->mallocFailed)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:91:6: error: variable 'trigger_name' is used uninitialized whenever '||' condition is true [-Werror,-Wsometimes-uninitialized]
        if (table == NULL || db->mallocFailed)
            ^~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:156:20: note: uninitialized use occurs here
        sqlite3DbFree(db, trigger_name);
                          ^~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:91:6: note: remove the '||' if its condition is always false
        if (table == NULL || db->mallocFailed)
            ^~~~~~~~~~~~~~~~
/Users/n.pettik/tarantool/src/box/sql/trigger.c:105:2: note: variable 'trigger_name' is declared here
        char *trigger_name = sqlite3NameFromToken(db, name);
        ^
4 errors generated.

They are not shown as errors (but displayed as warnings) in Travis,
since in RELEASE mode -Werror is not set.

      reply	other threads:[~2018-06-26 14:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 10:46 [tarantool-patches] [PATCH v4 0/6] sql: remove Triggers to server Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 1/6] sql: refactor sql_expr_compile to return AST Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 2/6] sql: move sqlite3DeleteTrigger to sql.h Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 3/6] box: sort error codes in misc.test Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 4/6] sql: new _trigger space format with space_id Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 5/6] sql: move Triggers to server Kirill Shcherbatov
2018-06-24 15:24   ` [tarantool-patches] " n.pettik
2018-06-24 20:41     ` Vladislav Shpilevoy
2018-06-25 15:27     ` Kirill Shcherbatov
2018-06-26 14:05       ` n.pettik
2018-06-26 16:13         ` Kirill Shcherbatov
2018-06-20 10:46 ` [tarantool-patches] [PATCH v4 6/6] sql: VDBE tests for trigger existence Kirill Shcherbatov
2018-06-24 15:25   ` [tarantool-patches] " n.pettik
2018-06-25 15:27     ` Kirill Shcherbatov
2018-06-26 14:49       ` n.pettik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52850DD4-F038-476E-B565-01AF0B7F87EB@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v4 6/6] sql: VDBE tests for trigger existence' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox