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

10.4 Build warning (debug only): error: 'error_num' may be used uninitialized in this function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.4
    • Fix Version/s: 10.4
    • Component/s: Compiling
    • Labels:
      None

      Description

      Build 10.4 in debug, and compilation will fail with:

      In file included from /data/git/10.4_dbg/include/my_global.h:1067:0,
                       from /data/git/10.4_dbg/storage/spider/spd_db_conn.cc:18:
      /data/git/10.4_dbg/include/my_dbug.h: In function 'int spider_db_simple_action(uint, spider_db_handler*, int)':
      /data/git/10.4_dbg/include/my_dbug.h:79:71: error: 'error_num' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       #define DBUG_RETURN(a1) do { _db_stack_frame_.line=__LINE__; return(a1);} while(0)
                                                                             ^
      /data/git/10.4_dbg/storage/spider/spd_db_conn.cc:5727:7: note: 'error_num' was declared here
         int error_num;
             ^~~~~~~~~
      

      Optimized build works fine.

      Setting -DMYSQL_MAINTAINER_MODE=0 fixes the issue on debug.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: