Fixed compiler warnings.

This commit is contained in:
Markus Makela
2015-10-14 10:58:32 +03:00
parent 62477c5760
commit 9b65e0b8b6
4 changed files with 9 additions and 8 deletions

View File

@ -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);
void blr_master_close(ROUTER_INSTANCE *);
char * blr_last_event_description(ROUTER_INSTANCE *router);
extern int MaxScaleUptime();
/** The module object definition */
static ROUTER_OBJECT MyObject = {
@ -199,7 +200,6 @@ int i;
unsigned char *defuuid;
char path[PATH_MAX+1] = "";
char filename[PATH_MAX+1] = "";
int master_info = 0;
int rc = 0;
char task_name[BLRM_TASK_NAME_LEN+1] = "";
@ -630,8 +630,6 @@ char task_name[BLRM_TASK_NAME_LEN+1] = "";
} else {
inst->master_state = BLRM_UNCONNECTED;
master_info = 1;
/* Try loading dbusers */
blr_load_dbusers(inst);
}

View File

@ -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);
extern uint32_t extract_field(uint8_t *src, int bits);
static void blr_format_event_size(double *event_size, char *label);
extern int MaxScaleUptime();
/**
* Initialise the binlog file for this instance. MaxScale will look
@ -719,8 +720,7 @@ int fd;
strncat(path, "/cache", PATH_MAX);
if (access(path, R_OK) == -1) {
int mkdir_ret;
mkdir_ret = mkdir(path, 0700);
mkdir(path, 0700);
}
strncat(path, "/", PATH_MAX);

View File

@ -3395,7 +3395,6 @@ blr_set_master_port(ROUTER_INSTANCE *router, char *port) {
*/
static char *
blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
int change_binlog = 0;
char *new_binlog_file = NULL;
if (filename) {
@ -3460,7 +3459,6 @@ blr_set_master_logfile(ROUTER_INSTANCE *router, char *filename, char *error) {
/* Compare binlog file name with current one */
if (strcmp(router->binlog_name, file_ptr) == 0) {
/* No binlog name change, eventually new position will be checked later */
change_binlog = 0;
} else {
/*
* 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 */
change_binlog = 1;
}
/* allocate new filename */

View File

@ -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 int blr_test_handle_change_master(ROUTER_INSTANCE* router, char *command, char *error);
int
MaxScaleUptime()
{
return 1;
}
static struct option long_options[] = {
{"debug", no_argument, 0, 'd'},
{"verbose", no_argument, 0, 'v'},