From: Alexander Turenko <alexander.turenko@tarantool.org> To: Gleb Skiba <gleb-skiba@mail.ru>, Nikita Pettik <korablev@tarantool.org> Cc: tarantool-patches@freelists.org Subject: [tarantool-patches] Re: [PATCH] Fix warnings Date: Wed, 11 Apr 2018 01:13:32 +0300 [thread overview] Message-ID: <20180410221332.bofdk4ickghsxkpj@tkn_work_nb> (raw) In-Reply-To: <1522832384-14155-1-git-send-email-gleb-skiba@mail.ru> 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.
next prev parent reply other threads:[~2018-04-10 22:13 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-04 8:59 [tarantool-patches] " Gleb 2018-04-10 22:13 ` Alexander Turenko [this message] [not found] <1522247382-8505-1-git-send-email-gleb-skiba@mail.ru> 2018-03-29 18:33 ` [tarantool-patches] " Alexander Turenko
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=20180410221332.bofdk4ickghsxkpj@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=gleb-skiba@mail.ru \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH] Fix warnings' \ /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