From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 61682219FE for ; Tue, 26 Jun 2018 10:49:43 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hTC8VnqRG3OV for ; Tue, 26 Jun 2018 10:49:43 -0400 (EDT) Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id AA463219E4 for ; Tue, 26 Jun 2018 10:49:42 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH v4 6/6] sql: VDBE tests for trigger existence From: "n.pettik" In-Reply-To: Date: Tue, 26 Jun 2018 17:49:36 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <52850DD4-F038-476E-B565-01AF0B7F87EB@tarantool.org> References: <8bb49455a1fa0aa86ca338deffb25d4d447acb7e.1529490955.git.kshcherbatov@tarantool.org> <0CD65924-D11C-401F-A9D5-4EC06F5310A8@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov 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) !=3D 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) !=3D 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 =3D=3D 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 =3D=3D 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 =3D=3D 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 =3D=3D NULL || db->mallocFailed) ^~~~~~~~~~~~~~~~ /Users/n.pettik/tarantool/src/box/sql/trigger.c:105:2: note: variable = 'trigger_name' is declared here char *trigger_name =3D 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.