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

Spider: Fix GCC warnings, comparing the result of pointer addition ... and NULL

    XMLWordPrintable

Details

    Description

      GCC 12 says:

      /mariadb/10.9/storage/spider/spd_db_mysql.cc: In member function 'virtual int spider_db_mbase::append_lock_tables(spider_string*)':
      /mariadb/10.9/storage/spider/spd_db_mysql.cc:3722:9: error: comparing the result of pointer addition '(db_share->spider_mbase_share::db_names_str + ((sizetype)(conn_link_idx * 52)))' and NULL [-Werror=address]
       3722 |     if (&db_share->db_names_str[conn_link_idx])
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /mariadb/10.9/storage/spider/spd_db_mysql.cc:3732:9: error: comparing the result of pointer addition '(db_share->spider_mbase_share::table_names_str + ((sizetype)(conn_link_idx * 52)))' and NULL [-Werror=address]
       3732 |     if (&db_share->table_names_str[conn_link_idx])
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      The current affect (or fix) version, 10.9, might not be correct. Check the older versions too.

      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.