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 85FB82C580 for ; Tue, 10 Apr 2018 18:13:29 -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 Nu2kLUYWn_sr for ; Tue, 10 Apr 2018 18:13:29 -0400 (EDT) Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 CE6DE2C4B0 for ; Tue, 10 Apr 2018 18:13:28 -0400 (EDT) Date: Wed, 11 Apr 2018 01:13:32 +0300 From: Alexander Turenko Subject: [tarantool-patches] Re: [PATCH] Fix warnings Message-ID: <20180410221332.bofdk4ickghsxkpj@tkn_work_nb> References: <1522832384-14155-1-git-send-email-gleb-skiba@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1522832384-14155-1-git-send-email-gleb-skiba@mail.ru> 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: Gleb Skiba , Nikita Pettik Cc: tarantool-patches@freelists.org Hi Gleb! Please, remove set(CMAKE_C(XX)_FLAGS) from src/box/sql/CMakeLists.txt, because it becomes redundant. Travis-CI fails on your commit on say unit test. It seems it was fixed in recent 2.0 branch, please rebase on 2.0 and make sure CI is passed. The patch generally looks good for me except notes above and below. Nikita, can you look into the patch? On Wed, Apr 04, 2018 at 11:59:44AM +0300, Gleb wrote: > Ensure -Werror -Wall set for the whole src/. > Fix warnings which have been find with -Werror and -Wall. > Add new building target RelWithDebInfoWError. > Change building target on RelWithDebInfoWError in Ci. > Fixes #3238 Separate 'Fixes #xxxx' with newline for readability. Ci -> CI. > index 05d33ab..6ec5f93 100644 > --- a/cmake/compiler.cmake > +++ b/cmake/compiler.cmake > @@ -251,12 +251,19 @@ macro(enable_tnt_compile_flags) > add_definitions("-D__STDC_LIMIT_MACROS=1") > add_definitions("-D__STDC_CONSTANT_MACROS=1") > > - # Only add -Werror if it's a debug build, done by developers. > + # Only add -Werror if it's a Debug or > + # RelWithDebInfoWError build, done by developers. > # Release builds should not cause extra trouble. > if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") > AND HAVE_STD_C11 AND HAVE_STD_CXX11) > add_compile_flags("C;CXX" "-Werror") > endif() > + > + if ((${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfoWError") > + AND HAVE_STD_C11 AND HAVE_STD_CXX11) > + add_compile_flags("C;CXX" "-Werror") > + message("Trouble Release") > + endif() > endmacro(enable_tnt_compile_flags) Please, remove the message. > @@ -1040,13 +1040,15 @@ log_vsay(struct log *log, int level, const char *filename, int line, > break; > case SAY_LOGGER_SYSLOG: > write_to_syslog(log, total); > - if (level == S_FATAL && log->fd != STDERR_FILENO) > - (void) write(STDERR_FILENO, buf, total); > + if (level == S_FATAL && log->fd != STDERR_FILENO) { > + ssize_t r = write(STDERR_FILENO, buf, total); > + (void) r; /* silence gcc warning */ > + } > break; Replace 23 spaces before comment with one. WBR, Alexander Turenko.