Commit 27e3214b authored by Davi Arnaut's avatar Davi Arnaut

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.
parent e8c13e6a
......@@ -1083,7 +1083,7 @@ static const char **init_default_directories(MEM_ROOT *alloc)
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__ */
......
......@@ -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;
}
......
......@@ -1758,7 +1758,7 @@ void Query_arena::set_query_arena(Query_arena *set)
void Query_arena::cleanup_stmt()
{
DBUG_ASSERT("Query_arena::cleanup_stmt()" == "not implemented");
DBUG_ASSERT(! "Query_arena::cleanup_stmt() not implemented");
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment