Skip to content

Conversation

@amyangfei
Copy link
Collaborator

@amyangfei amyangfei commented May 15, 2025

fix following errors


/data/workspace/code/TXSQL/sql/rpl_applier_reader.cc: In member function ‘void Rpl_applier_reader::Stage_controller::enter_stage()’:                                                                                                                           /data/workspace/code/TXSQL/sql/rpl_applier_reader.cc:73:25: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
   73 |     DBUG_ASSERT(m_state = LOCKED);
      |                 ~~~~~~~~^~~~~~~~
/data/workspace/code/TXSQL/sql/rpl_applier_reader.cc:73:5: note: in expansion of macro ‘DBUG_ASSERT’
   73 |     DBUG_ASSERT(m_state = LOCKED);                                                                                                                                                                                                                           |     ^~~~~~~~~~~

In file included from /data/workspace/code/TXSQL/storage/temptable/src/indexed_cells.cc:31:
/data/workspace/code/TXSQL/include/my_hash_combine.h:84:13: error: variable or field ‘my_hash_combine’ declared void
   84 | inline void my_hash_combine(std::uint64_t &h, std::uint64_t k) {
      |             ^~~~~~~~~~~~~~~
/data/workspace/code/TXSQL/include/my_hash_combine.h:84:34: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘uint64_t’?
   84 | inline void my_hash_combine(std::uint64_t &h, std::uint64_t k) {
      |                                  ^~~~~~~~
In file included from /usr/include/stdint.h:37,
                 from /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/include/stdint.h:9,
                 from /data/workspace/code/TXSQL/include/my_hash_combine.h:64,
                 from /data/workspace/code/TXSQL/storage/temptable/src/indexed_cells.cc:31:
/usr/include/bits/stdint-uintn.h:27:20: note: ‘uint64_t’ declared here
   27 | typedef __uint64_t uint64_t;
      |                    ^~~~~~~~
In file included from /data/workspace/code/TXSQL/storage/temptable/src/indexed_cells.cc:31:
/data/workspace/code/TXSQL/include/my_hash_combine.h:84:44: error: ‘h’ was not declared in this scope
   84 | inline void my_hash_combine(std::uint64_t &h, std::uint64_t k) {
      |                                            ^
/data/workspace/code/TXSQL/include/my_hash_combine.h:84:52: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘uint64_t’?
   84 | inline void my_hash_combine(std::uint64_t &h, std::uint64_t k) {
      |                                                    ^~~~~~~~
In file included from /usr/include/stdint.h:37,
                 from /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/include/stdint.h:9,
                 from /data/workspace/code/TXSQL/include/my_hash_combine.h:64,
                 from /data/workspace/code/TXSQL/storage/temptable/src/indexed_cells.cc:31:
/usr/include/bits/stdint-uintn.h:27:20: note: ‘uint64_t’ declared here
   27 | typedef __uint64_t uint64_t;
      |                    ^~~~~~~~

/data/workspace/code/TXSQL/sql/rpl_binlog_sender.cc: In member function ‘void Binlog_sender::run()’:
/data/workspace/code/TXSQL/sql/rpl_binlog_sender.cc:362:42: error: ‘%s’ directive output may be truncated writing up to 511 bytes into a region of size between 427 and 938 [-Werror=format-truncation=]
  362 |                "the last byte read from '%s' at %lld.",
      |                                          ^~
/data/workspace/code/TXSQL/sql/rpl_binlog_sender.cc:360:16: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument
  360 |                "%s; the first event '%s' at %lld, "
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  361 |                "the last event read from '%s' at %lld, "
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  362 |                "the last byte read from '%s' at %lld.",
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/workspace/code/TXSQL/sql/rpl_binlog_sender.cc:359:15: note: ‘snprintf’ output 94 or more bytes (assuming 1116) into a destination of size 1024
  359 |       snprintf(error_text, sizeof(error_text),
      |       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  360 |                "%s; the first event '%s' at %lld, "
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  361 |                "the last event read from '%s' at %lld, "
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  362 |                "the last byte read from '%s' at %lld.",
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  363 |                m_errmsg, m_start_file, m_start_pos, m_last_file, m_last_pos,
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  364 |                log_file, reader.position());
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

/data/workspace/code/TXSQL/sql/udpsvr.cc: In member function ‘void CUdpServer::loopdealreq()’:
/data/workspace/code/TXSQL/sql/udpsvr.cc:146:20: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 24 equals destination size [-Werror=stringop-truncation]
  146 |             strncpy(fromaddr, inet_ntoa(from.sin_addr), 24);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@CLAassistant
Copy link

CLAassistant commented May 15, 2025

CLA assistant check
All committers have signed the CLA.

Signed-off-by: amyangfei <amyangfei@gmail.com>
@amyangfei amyangfei force-pushed the fix-gcc10-build-error branch from dcae36a to aa3f3d8 Compare May 15, 2025 05:40
@amyangfei amyangfei merged commit dc7770c into 8.0 May 15, 2025
1 of 2 checks passed
@amyangfei amyangfei deleted the fix-gcc10-build-error branch May 15, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants