From 458af516886dc6e6373734f4c5b48ea0ffa7e987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:32:45 +0100 Subject: check_mysql: delare file local variables static diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 1f0b709..8a73772 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -45,23 +45,23 @@ const char *email = "devel@monitoring-plugins.org"; #include #include -char *db_user = NULL; -char *db_host = NULL; -char *db_socket = NULL; -char *db_pass = NULL; -char *db = NULL; -char *ca_cert = NULL; -char *ca_dir = NULL; -char *cert = NULL; -char *key = NULL; -char *ciphers = NULL; -bool ssl = false; -char *opt_file = NULL; -char *opt_group = NULL; -unsigned int db_port = MYSQL_PORT; -bool check_slave = false; -bool ignore_auth = false; -int verbose = 0; +static char *db_user = NULL; +static char *db_host = NULL; +static char *db_socket = NULL; +static char *db_pass = NULL; +static char *db = NULL; +static char *ca_cert = NULL; +static char *ca_dir = NULL; +static char *cert = NULL; +static char *key = NULL; +static char *ciphers = NULL; +static bool ssl = false; +static char *opt_file = NULL; +static char *opt_group = NULL; +static unsigned int db_port = MYSQL_PORT; +static bool check_slave = false; +static bool ignore_auth = false; +static int verbose = 0; static double warning_time = 0; static double critical_time = 0; @@ -91,11 +91,11 @@ static const char *metric_counter[LENGTH_METRIC_COUNTER] = { #define MYSQLDUMP_THREADS_QUERY "SELECT COUNT(1) mysqldumpThreads FROM information_schema.processlist WHERE info LIKE 'SELECT /*!40001 SQL_NO_CACHE */%'" -thresholds *my_threshold = NULL; +static thresholds *my_threshold = NULL; -int process_arguments (int, char **); -int validate_arguments (void); -void print_help (void); +static int process_arguments (int, char **); +static int validate_arguments (void); +static void print_help (void); void print_usage (void); int -- cgit v0.10-9-g596f