Fixed compiler warnings.
This commit is contained in:
@ -113,6 +113,7 @@ extern char *create_hex_sha1_sha1_passwd(char *passwd);
|
|||||||
extern int blr_read_events_all_events(ROUTER_INSTANCE *router, int fix, int debug);
|
extern int blr_read_events_all_events(ROUTER_INSTANCE *router, int fix, int debug);
|
||||||
void blr_master_close(ROUTER_INSTANCE *);
|
void blr_master_close(ROUTER_INSTANCE *);
|
||||||
char * blr_last_event_description(ROUTER_INSTANCE *router);
|
char * blr_last_event_description(ROUTER_INSTANCE *router);
|
||||||
|
extern int MaxScaleUptime();
|
||||||
|
|
||||||
/** The module object definition */
|
/** The module object definition */
|
||||||
static ROUTER_OBJECT MyObject = {
|
static ROUTER_OBJECT MyObject = {
|
||||||
@ -199,7 +200,6 @@ int i;
|
|||||||
unsigned char *defuuid;
|
unsigned char *defuuid;
|
||||||
char path[PATH_MAX+1] = "";
|
char path[PATH_MAX+1] = "";
|
||||||
char filename[PATH_MAX+1] = "";
|
char filename[PATH_MAX+1] = "";
|
||||||
int master_info = 0;
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
char task_name[BLRM_TASK_NAME_LEN+1] = "";
|
char task_name[BLRM_TASK_NAME_LEN+1] = "";
|
||||||
|
|
||||||
@ -630,8 +630,6 @@ char task_name[BLRM_TASK_NAME_LEN+1] = "";
|
|||||||
} else {
|
} else {
|
||||||
inst->master_state = BLRM_UNCONNECTED;
|
inst->master_state = BLRM_UNCONNECTED;
|
||||||
|
|
||||||
master_info = 1;
|
|
||||||
|
|
||||||
/* Try loading dbusers */
|
/* Try loading dbusers */
|
||||||
blr_load_dbusers(inst);
|
blr_load_dbusers(inst);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,6 +76,7 @@ void blr_file_use_binlog(ROUTER_INSTANCE *router, char *file);
|
|||||||
int blr_file_write_master_config(ROUTER_INSTANCE *router, char *error);
|
int blr_file_write_master_config(ROUTER_INSTANCE *router, char *error);
|
||||||
extern uint32_t extract_field(uint8_t *src, int bits);
|
extern uint32_t extract_field(uint8_t *src, int bits);
|
||||||
static void blr_format_event_size(double *event_size, char *label);
|
static void blr_format_event_size(double *event_size, char *label);
|
||||||
|
extern int MaxScaleUptime();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise the binlog file for this instance. MaxScale will look
|
* Initialise the binlog file for this instance. MaxScale will look
|
||||||
@ -719,8 +720,7 @@ int fd;
|
|||||||
strncat(path, "/cache", PATH_MAX);
|
strncat(path, "/cache", PATH_MAX);
|
||||||
|
|
||||||
if (access(path, R_OK) == -1) {
|
if (access(path, R_OK) == -1) {
|
||||||
int mkdir_ret;
|
mkdir(path, 0700);
|
||||||
mkdir_ret = mkdir(path, 0700);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
strncat(path, "/", PATH_MAX);
|
strncat(path, "/", PATH_MAX);
|
||||||
|
|||||||
@ -3395,7 +3395,6 @@ blr_set_master_port(ROUTER_INSTANCE *router, char *port) {
|
|||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
|
blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
|
||||||
int change_binlog = 0;
|
|
||||||
char *new_binlog_file = NULL;
|
char *new_binlog_file = NULL;
|
||||||
|
|
||||||
if (filename) {
|
if (filename) {
|
||||||
@ -3460,7 +3459,6 @@ blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
|
|||||||
/* Compare binlog file name with current one */
|
/* Compare binlog file name with current one */
|
||||||
if (strcmp(router->binlog_name, file_ptr) == 0) {
|
if (strcmp(router->binlog_name, file_ptr) == 0) {
|
||||||
/* No binlog name change, eventually new position will be checked later */
|
/* No binlog name change, eventually new position will be checked later */
|
||||||
change_binlog = 0;
|
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* This is a new binlog file request
|
* This is a new binlog file request
|
||||||
@ -3481,7 +3479,6 @@ blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Binlog file name succesfully changed */
|
/* Binlog file name succesfully changed */
|
||||||
change_binlog = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allocate new filename */
|
/* allocate new filename */
|
||||||
|
|||||||
@ -60,6 +60,12 @@ extern int blr_test_parse_change_master_command(char *input, char *error_string,
|
|||||||
extern char *blr_test_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error);
|
extern char *blr_test_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error);
|
||||||
extern int blr_test_handle_change_master(ROUTER_INSTANCE* router, char *command, char *error);
|
extern int blr_test_handle_change_master(ROUTER_INSTANCE* router, char *command, char *error);
|
||||||
|
|
||||||
|
int
|
||||||
|
MaxScaleUptime()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"debug", no_argument, 0, 'd'},
|
{"debug", no_argument, 0, 'd'},
|
||||||
{"verbose", no_argument, 0, 'v'},
|
{"verbose", no_argument, 0, 'v'},
|
||||||
|
|||||||
Reference in New Issue
Block a user