summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-02-10 22:53:25 +0200
committerMichael Widenius <monty@askmonty.org>2011-02-10 22:53:25 +0200
commit75fad9dc95646de03b45fc74dca5673809d679a9 (patch)
tree351570e08c492e8a408783e1b6f0d3f58e17f490
parentf2ca9c87845655083f186fb0d102699d78c6b22a (diff)
downloadmariadb-git-75fad9dc95646de03b45fc74dca5673809d679a9.tar.gz
Fixed compiler warnings
-rw-r--r--cmd-line-utils/libedit/vi.c5
-rw-r--r--storage/xtradb/buf/buf0buf.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/cmd-line-utils/libedit/vi.c b/cmd-line-utils/libedit/vi.c
index d628f076a1d..b1827fc98f1 100644
--- a/cmd-line-utils/libedit/vi.c
+++ b/cmd-line-utils/libedit/vi.c
@@ -1012,8 +1012,9 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__)))
if (fd < 0)
return CC_ERROR;
cp = el->el_line.buffer;
- write(fd, cp, el->el_line.lastchar - cp +0u);
- write(fd, "\n", 1);
+ if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1 ||
+ write(fd, "\n", 1) == -1)
+ return CC_ERROR;
pid = fork();
switch (pid) {
case -1:
diff --git a/storage/xtradb/buf/buf0buf.c b/storage/xtradb/buf/buf0buf.c
index 1e9624fce50..f09354e370f 100644
--- a/storage/xtradb/buf/buf0buf.c
+++ b/storage/xtradb/buf/buf0buf.c
@@ -2196,7 +2196,7 @@ buf_page_get_gen(
ulint fix_type;
ibool must_read;
ulint retries = 0;
- mutex_t* block_mutex;
+ mutex_t* block_mutex= 0;
trx_t* trx = NULL;
ulint sec;
ulint ms;