summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorVasil Dimov <vasil.dimov@oracle.com>2010-09-14 13:01:25 +0300
committerVasil Dimov <vasil.dimov@oracle.com>2010-09-14 13:01:25 +0300
commit5e4febf4f3fc5cc55d3375c4c6abbdcf40b3da1a (patch)
tree9470584d9b81a5855f81e4c50bc805ff3ce16d5f /storage/innobase
parent1813340bd6ce6a8813f5b4ce7fae609c55799946 (diff)
downloadmariadb-git-5e4febf4f3fc5cc55d3375c4c6abbdcf40b3da1a.tar.gz
(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:1318:14: error: variable 'purpose_str' set but not used [-Werror=unused-but-set-variable] os/os0file.c:1317:14: error: variable 'type_str' set but not used [-Werror=unused-but-set-variable]
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/os/os0file.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
index 3396d1adf2f..a995aee5fab 100644
--- a/storage/innobase/os/os0file.c
+++ b/storage/innobase/os/os0file.c
@@ -1314,8 +1314,6 @@ try_again:
int create_flag;
ibool retry;
const char* mode_str = NULL;
- const char* type_str = NULL;
- const char* purpose_str = NULL;
try_again:
ut_a(name);
@@ -1335,26 +1333,9 @@ try_again:
ut_error;
}
- if (type == OS_LOG_FILE) {
- type_str = "LOG";
- } else if (type == OS_DATA_FILE) {
- type_str = "DATA";
- } else {
- ut_error;
- }
+ ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE);
+ ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL);
- 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
/* 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