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

Fix g++-13 -Wmaybe-uninitialized warnings

    XMLWordPrintable

Details

    Description

      Reported by marko, happens when building with -Og and in various components, and likely to pop up again from time to time, so I suggest we keep this ticket open and ongoing as more patches get reviewed and pushed for this issue.

      For example, instead of

        if (
          !(db_name = get_field(mem_root, table->field[0])) ||
          !(table_name = get_field(mem_root, table->field[1])) ||
          !(link_id = get_field(mem_root, table->field[2]))
        )
          DBUG_RETURN(HA_ERR_OUT_OF_MEM);
      

      fix with

      if (!(db_name = get_field(...))
        DBUG_RETURN(...);
      if (!(table_name = get_field(...))
        DBUG_RETURN(...);
      if (!(link_id = get_field(...))
        DBUG_RETURN(...);
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            ycp Yuchen Pei
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.