1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-06-13 16:01:32 +03:00

New warnfixes (#2254)

* Fix clang warnings

* Remove vim tab guides

* initialize variables

* 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length

* Fix ISO C++17 does not allow 'register' storage class specifier for outdated bison

* chars are unsigned on ARM, having  if (ival < 0) always false

* chars are unsigned by default on ARM and comparison with -1 if always true
This commit is contained in:
Leonid Fedorov
2022-02-17 13:08:58 +03:00
committed by GitHub
parent 15a87ee510
commit 3919c541ac
325 changed files with 20 additions and 353 deletions

View File

@ -101,8 +101,6 @@ using boost::scoped_array;
// some static functions
namespace
{
using messageqcpp::ByteStream;
// @bug 2441 - Retry after 512 read() error.
// ERESTARTSYS (512) is a kernal I/O errno that is similar to a EINTR, except
// that it is not supposed to "leak" out into the user space. But we are
@ -937,16 +935,8 @@ void InetStreamSocket::connect(const sockaddr* serv_addr)
char buf = '\0';
(void)::recv(socketParms().sd(), &buf, 1, 0);
#else
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
char buf = '\0';
::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
#pragma GCC diagnostic pop
#else
char buf = '\0';
::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
#endif // pragma
std::ignore = ::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
#endif
return;
}