X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fdrizzled.cc;h=16933c4bdab08e09a0573c5b8b629223e437f0c8;hb=17690735658d7b44f91579df91e31da9ae185158;hp=70eca0268591f8efbe511044e7d687fdbee4c64c;hpb=a1f2b0b98e03369ed051b232f1fc33ed1d611b16;p=awesomized%2Flibmemcached diff --git a/libtest/drizzled.cc b/libtest/drizzled.cc index 70eca026..16933c4b 100644 --- a/libtest/drizzled.cc +++ b/libtest/drizzled.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libtest/yatlcon.h" #include #include @@ -70,6 +70,7 @@ using namespace libtest; namespace libtest { bool ping_drizzled(const in_port_t _port) { + (void)(_port); #if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE { drizzle_st *drizzle= drizzle_create(NULL); @@ -148,7 +149,7 @@ public: return "drizzled"; }; - void log_file_option(Application& app, const std::string& arg) + void log_file_option(Application&, const std::string&) { } @@ -181,9 +182,10 @@ public: { if (arg > 0) { - char buffer[1024]; - snprintf(buffer, sizeof(buffer), "--drizzle-protocol.port=%d", int(arg)); - app.add_option(buffer); + libtest::vchar_t buffer; + buffer.resize(1024); + snprintf(&buffer[1024], buffer.size(), "--drizzle-protocol.port=%d", int(arg)); + app.add_option(&buffer[1024]); } } @@ -204,6 +206,11 @@ bool Drizzle::build(size_t argc, const char *argv[]) for (size_t x= 0 ; x < argc ; x++) { + if (argv[x] == NULL) + { + break; + } + add_option(argv[x]); }