Commit fa1b367b authored by Vasil Dimov's avatar Vasil Dimov

(partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6

Fix compiler warnings:
os/os0file.c: In function 'os_file_create':
os/os0file.c:1371:14: error: variable 'purpose_str' set but not used [-Werror=unused-but-set-variable]
os/os0file.c:1370:14: error: variable 'type_str' set but not used [-Werror=unused-but-set-variable]
parent 88c37655
...@@ -1367,8 +1367,6 @@ try_again: ...@@ -1367,8 +1367,6 @@ try_again:
int create_flag; int create_flag;
ibool retry; ibool retry;
const char* mode_str = NULL; const char* mode_str = NULL;
const char* type_str = NULL;
const char* purpose_str = NULL;
try_again: try_again:
ut_a(name); ut_a(name);
...@@ -1388,26 +1386,9 @@ try_again: ...@@ -1388,26 +1386,9 @@ try_again:
ut_error; ut_error;
} }
if (type == OS_LOG_FILE) { ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE);
type_str = "LOG"; ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL);
} else if (type == OS_DATA_FILE) {
type_str = "DATA";
} else {
ut_error;
}
if (purpose == OS_FILE_AIO) {
purpose_str = "AIO";
} else if (purpose == OS_FILE_NORMAL) {
purpose_str = "NORMAL";
} else {
ut_error;
}
#if 0
fprintf(stderr, "Opening file %s, mode %s, type %s, purpose %s\n",
name, mode_str, type_str, purpose_str);
#endif
#ifdef O_SYNC #ifdef O_SYNC
/* We let O_SYNC only affect log files; note that we map O_DSYNC to /* We let O_SYNC only affect log files; note that we map O_DSYNC to
O_SYNC because the datasync options seemed to corrupt files in 2001 O_SYNC because the datasync options seemed to corrupt files in 2001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment