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

Overloaded functions dbug_print_rec break compilation in 10.3

    XMLWordPrintable

Details

    Description

      Implementations of overloaded standalone functions dbug_print_rec, located in the file storage/innobase/ut/ut0ut.cc, return pointer to a temporary allocated memory. In result attempt to compile server on MacOS fails with error

      [ 18%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/ut/ut0ut.cc.o
      10.3/storage/innobase/ut/ut0ut.cc:635:9: error: returning address
            of local temporary object [-Werror,-Wreturn-stack-address]
              return r.str().c_str();
                     ^~~~~~~
      10.3/storage/innobase/ut/ut0ut.cc:641:9: error: returning address
            of local temporary object [-Werror,-Wreturn-stack-address]
              return r.str().c_str();
                     ^~~~~~~
      10.3/storage/innobase/ut/ut0ut.cc:647:9: error: returning address
            of local temporary object [-Werror,-Wreturn-stack-address]
              return r.str().c_str();
                     ^~~~~~~
      10.3/storage/innobase/ut/ut0ut.cc:653:9: error: returning address
            of local temporary object [-Werror,-Wreturn-stack-address]
              return r.str().c_str();
                     ^~~~~~~
      10.3/storage/innobase/ut/ut0ut.cc:665:9: error: returning address
            of local temporary object [-Werror,-Wreturn-stack-address]
              return r.str().c_str();
                     ^~~~~~~
      5 errors generated.
      

      The overloaded function dbug_print_rec() isn't used anywhere along the source code.
      So, it is proposed to remove them at all.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              shulga Dmitry Shulga
              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.