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

[PATCH] "Unused variable" warnings in the tarball

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.1
    • 10.0.2
    • None
    • None

    Description

      10.0.1 tarball compiles with a couple of "Unused variable" warnings which become errors if compiled with -Werror. Please consider fixing that in MariaDB 10.0.2. You can use the following patch:

      diff --git a/sql/mysqld.cc b/sql/mysqld.cc
      --- a/sql/mysqld.cc
      +++ b/sql/mysqld.cc
      @@ -738,6 +738,8 @@ static char **remaining_argv;
       int orig_argc;
       char **orig_argv;
       
      +#ifndef EMBEDDED_LIBRARY
      +
       static struct my_option pfs_early_options[]=
       {
         {"performance_schema_instrument", OPT_PFS_INSTRUMENT,
      @@ -806,6 +808,8 @@ static struct my_option pfs_early_options[]=
           GET_BOOL, OPT_ARG, TRUE, 0, 0, 0, 0, 0}
       };
       
      +#endif
      +
       
       
       #ifdef HAVE_PSI_INTERFACE
      diff --git a/vio/viosocket.c b/vio/viosocket.c
      --- a/vio/viosocket.c
      +++ b/vio/viosocket.c
      @@ -953,7 +953,8 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
           break;
         default:
           /* Ensure that the requested I/O event has completed. */
      -    DBUG_ASSERT(pfd.revents & revents);
      +    if ((pfd.revents & revents) == 0)
      +      DBUG_ASSERT(0);
           break;
         }
       

      Attachments

        Activity

          People

            serg Sergei Golubchik
            pivanof Pavel Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.