Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26852

Spider: -Werror=maybe-uninitialized raises on spd_sys_table.cc and ha_spider.cc

    XMLWordPrintable

Details

    Description

      When compiling Spider with 10.6, I got these errors:

      /mariadb/10.6m/storage/spider/spd_sys_table.cc: In function 'int spider_get_sys_link_mon_key(TABLE*, SPIDER_MON_KEY*, MEM_ROOT*, int*)':
      /mariadb/10.6m/storage/spider/spd_sys_table.cc:3110:12: error: 'link_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       3110 |     !memcmp(link_id, mon_key->link_id, link_id_length)
            |      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /mariadb/10.6m/storage/spider/spd_sys_table.cc:3109:12: error: 'table_name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       3109 |     !memcmp(table_name, mon_key->table_name, table_name_length) &&
            |      ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      That is with GCC 11, CMAKE_BUILD_TYPE=Debug and CMAKE_CXX_FLAGS=-Og.

      On 10.3, I got the following:

      /home/nayuta_mariadb/repo/mariadb-server/storage/spider/ha_spider.cc:428:47: error: ‘hash_value’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
        428 |     partition_handler_share->table_hash_value = hash_value;
      

      Attachments

        Activity

          People

            nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.