From 27e3214b494b0cec3bdb5de927d18bc04323f6fb Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 19 Mar 2009 17:20:15 -0300 Subject: 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. --- mysys/default.c | 2 +- mysys/my_new.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'mysys') diff --git a/mysys/default.c b/mysys/default.c index 0067e95ffbe..362aa0d4605 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -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__ */ diff --git a/mysys/my_new.cc b/mysys/my_new.cc index babfe04d695..7da54ffac87 100644 --- a/mysys/my_new.cc +++ b/mysys/my_new.cc @@ -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; } -- cgit v1.2.1