MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:March 19 2009 8:20pm
Subject:bzr commit into mysql-5.0-bugteam branch (davi:2782) Bug#43461
View as plain text  
# At a local mysql-5.0-bugteam repository of davi

 2782 Davi Arnaut	2009-03-19
      Bug#43461: invalid comparison with string literal in default.c
      
      Don't compare string literals as it results in unspecified behavior.
     @ mysys/default.c
        Test for a empty string.

    modified:
      mysys/default.c
      mysys/my_new.cc
      sql/sql_class.cc
=== modified file 'mysys/default.c'
--- a/mysys/default.c	2008-07-22 10:55:15 +0000
+++ b/mysys/default.c	2009-03-19 20:20:15 +0000
@@ -1083,7 +1083,7 @@ static const char **init_default_directo
   if ((env= getenv("ETC")))
     errors += add_directory(alloc, env, dirs);
 #elif defined(DEFAULT_SYSCONFDIR)
-  if (DEFAULT_SYSCONFDIR != "")
+  if (DEFAULT_SYSCONFDIR[0])
     errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
 #endif /* __EMX__ || __OS2__ */
 

=== modified file 'mysys/my_new.cc'
--- a/mysys/my_new.cc	2006-12-23 19:17:15 +0000
+++ b/mysys/my_new.cc	2009-03-19 20:20:15 +0000
@@ -46,8 +46,9 @@ void operator delete[] (void *ptr) throw
 
 C_MODE_START
 
-int __cxa_pure_virtual() {
-  assert("Pure virtual method called." == "Aborted");
+int __cxa_pure_virtual()
+{
+  assert(! "Aborted: pure virtual method called.");
   return 0;
 }
 

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2009-03-06 10:49:39 +0000
+++ b/sql/sql_class.cc	2009-03-19 20:20:15 +0000
@@ -1758,7 +1758,7 @@ void Query_arena::set_query_arena(Query_
 
 void Query_arena::cleanup_stmt()
 {
-  DBUG_ASSERT("Query_arena::cleanup_stmt()" == "not implemented");
+  DBUG_ASSERT(! "Query_arena::cleanup_stmt() not implemented");
 }
 
 /*


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20090319202015-zbrlcvtuvcctaeib.bundle
Thread
bzr commit into mysql-5.0-bugteam branch (davi:2782) Bug#43461Davi Arnaut19 Mar