diff options
author | unknown <petr@mysql.com> | 2005-09-20 03:14:07 +0400 |
---|---|---|
committer | unknown <petr@mysql.com> | 2005-09-20 03:14:07 +0400 |
commit | 2260bbdfe80f9958e2c25bd401f881a9f650963f (patch) | |
tree | fd7480eac111f5c97d4eae8640cafc64527a7721 /server-tools | |
parent | 96dc3a3dfe7ae9427dfe7b6dd61543e6363fb5d3 (diff) | |
download | mariadb-git-2260bbdfe80f9958e2c25bd401f881a9f650963f.tar.gz |
fix warnings
server-tools/instance-manager/buffer.cc:
perform initialization of static consts in .cc file to respect VC6
server-tools/instance-manager/buffer.h:
fix compiler warning
server-tools/instance-manager/commands.cc:
fix compiler warning
server-tools/instance-manager/user_map.cc:
fix compiler warning
Diffstat (limited to 'server-tools')
-rw-r--r-- | server-tools/instance-manager/buffer.cc | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/buffer.h | 4 | ||||
-rw-r--r-- | server-tools/instance-manager/commands.cc | 4 | ||||
-rw-r--r-- | server-tools/instance-manager/user_map.cc | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/server-tools/instance-manager/buffer.cc b/server-tools/instance-manager/buffer.cc index 26df401c3c5..dd6e6e95704 100644 --- a/server-tools/instance-manager/buffer.cc +++ b/server-tools/instance-manager/buffer.cc @@ -21,6 +21,8 @@ #include "buffer.h" #include <m_string.h> +const uint Buffer::BUFFER_INITIAL_SIZE= 4096; +const uint Buffer::MAX_BUFFER_SIZE= 16777216; /* Puts the given string to the buffer. diff --git a/server-tools/instance-manager/buffer.h b/server-tools/instance-manager/buffer.h index e63d725f508..0c4d1eda102 100644 --- a/server-tools/instance-manager/buffer.h +++ b/server-tools/instance-manager/buffer.h @@ -33,9 +33,9 @@ class Buffer { private: - enum { BUFFER_INITIAL_SIZE= 4096 }; + static const uint BUFFER_INITIAL_SIZE; /* maximum buffer size is 16Mb */ - enum { MAX_BUFFER_SIZE= 16777216 }; + static const uint MAX_BUFFER_SIZE; size_t buffer_size; /* Error flag. Triggered if we get an error of some kind */ int error; diff --git a/server-tools/instance-manager/commands.cc b/server-tools/instance-manager/commands.cc index 1cf888eab45..b4dd1b469f1 100644 --- a/server-tools/instance-manager/commands.cc +++ b/server-tools/instance-manager/commands.cc @@ -695,9 +695,9 @@ Set_option::Set_option(Instance_map *instance_map_arg, int Set_option::correct_file(int skip) { - int error; - const static int mysys_to_im_error[]= { 0, ER_OUT_OF_RESOURCES, + static const int mysys_to_im_error[]= { 0, ER_OUT_OF_RESOURCES, ER_ACCESS_OPTION_FILE }; + int error; error= modify_defaults_file(Options::config_file, option, option_value, instance_name, skip); diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc index d13eb681d05..93c4a2ade25 100644 --- a/server-tools/instance-manager/user_map.cc +++ b/server-tools/instance-manager/user_map.cc @@ -66,7 +66,8 @@ int User::init(const char *line) */ if (password[strlen(password)-2] == '\r') line_ending_len= 2; - if (strlen(password) != SCRAMBLED_PASSWORD_CHAR_LENGTH + line_ending_len) + if (strlen(password) != (uint) (SCRAMBLED_PASSWORD_CHAR_LENGTH + + line_ending_len)) goto err; memcpy(user, name_begin, user_length); |