Commit 9fe6801a authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings


cmd-line-utils/readline/complete.c:
  Don't ignore value from fwrite()
cmd-line-utils/readline/terminal.c:
  Don't ignore value from fwrite()
extra/yassl/taocrypt/include/file.hpp:
  Changed prototype to be able to return value from fwrite()
extra/yassl/taocrypt/src/file.cpp:
  Return value from fwrite for put()
storage/xtradb/ut/ut0ut.c:
  Added casts to remove warnings for not critical usage of fwrite()
parent d46aee70
......@@ -673,8 +673,7 @@ fnprint (to_print)
w = wcwidth (wc);
width = (w >= 0) ? w : 1;
}
fwrite (s, 1, tlen, rl_outstream);
s += tlen;
s+= fwrite (s, 1, tlen, rl_outstream);
printed_len += width;
#else
putc (*s, rl_outstream);
......
......@@ -621,7 +621,8 @@ _rl_output_some_chars (string, count)
const char *string;
int count;
{
fwrite (string, 1, count, _rl_out_stream);
if (fwrite (string, 1, count, _rl_out_stream) != count)
fprintf(stderr, "Write failed\n");
}
/* Move the cursor back. */
......
......@@ -110,7 +110,7 @@ public:
word32 size(bool use_current = false);
private:
void put(Source&);
size_t put(Source&);
FileSink(const FileSink&); // hide
FileSink& operator=(const FileSink&); // hide
......
......@@ -98,9 +98,9 @@ FileSink::~FileSink()
// fill source from file sink
void FileSink::put(Source& source)
size_t FileSink::put(Source& source)
{
fwrite(source.get_buffer(), 1, source.size(), file_);
return fwrite(source.get_buffer(), 1, source.size(), file_);
}
......
......@@ -553,7 +553,7 @@ ut_print_namel(
trx ? trx->mysql_thd : NULL,
table_id);
fwrite(buf, 1, bufend - buf, f);
(void) fwrite(buf, 1, bufend - buf, f);
}
/**********************************************************************//**
......@@ -574,7 +574,7 @@ ut_copy_file(
? (size_t) len
: sizeof buf;
size_t size = fread(buf, 1, maxs, src);
fwrite(buf, 1, size, dest);
(void) fwrite(buf, 1, size, dest);
len -= (long) size;
if (size < maxs) {
break;
......
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