[MDEV-4226] [PATCH] "Unused variable" warnings in the tarball Created: 2013-03-02  Updated: 2013-04-04  Resolved: 2013-04-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.1
Fix Version/s: 10.0.2

Type: Bug Priority: Major
Reporter: Pavel Ivanov Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: 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;
   }
 


Generated at Thu Feb 08 06:54:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.