4615 jonas oreland 2011-10-20
ndb - warnings stab 3
modified:
sql/ha_ndbcluster.cc
storage/ndb/src/common/util/ndbzio.c
storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp
storage/ndb/tools/ndb_dump_frm_data.cpp
4614 jonas oreland 2011-10-20
ndb stab 2 at new warnings
modified:
sql/ha_ndb_index_stat.cc
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.h
sql/ha_ndbinfo.cc
storage/ndb/src/common/portlib/ndb_daemon.cc
storage/ndb/src/common/util/ndb_init.cpp
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
storage/ndb/src/kernel/vm/SimulatedBlock.cpp
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2011-10-20 16:18:28 +0000
+++ b/sql/ha_ndbcluster.cc 2011-10-20 18:36:21 +0000
@@ -6117,7 +6117,7 @@ int ha_ndbcluster::ndb_update_row(const
uint blob_count= 0;
if (uses_blob_value(table->write_set))
{
- int row_offset= new_data - table->record[0];
+ int row_offset= (int)(new_data - table->record[0]);
int res= set_blob_values(op, row_offset, table->write_set, &blob_count,
(batch_allowed && !need_flush));
if (res != 0)
@@ -11974,7 +11974,7 @@ int ndbcluster_find_all_files(THD *thd)
else
{
/* set up replication for this table */
- ndbcluster_create_binlog_setup(thd, ndb, key, end-key,
+ ndbcluster_create_binlog_setup(thd, ndb, key, (uint)(end-key),
elmt.database, elmt.name,
TRUE);
}
@@ -15169,7 +15169,7 @@ ndbcluster_show_status(handlerton *hton,
ns.transaction_no_hint_count[i] > 0)
{
uint namelen= (uint)my_snprintf(name, sizeof(name), "node[%d]", i);
- buflen= my_snprintf(buf, sizeof(buf),
+ buflen= (uint)my_snprintf(buf, sizeof(buf),
"transaction_hint=%ld, transaction_no_hint=%ld",
ns.transaction_hint_count[i],
ns.transaction_no_hint_count[i]);
@@ -16698,7 +16698,7 @@ static int ndbcluster_fill_files_table(h
table->field[IS_FILES_LOGFILE_GROUP_NAME]->set_notnull();
table->field[IS_FILES_LOGFILE_GROUP_NAME]->
store(ts.getDefaultLogfileGroup(),
- strlen(ts.getDefaultLogfileGroup()),
+ (uint)strlen(ts.getDefaultLogfileGroup()),
system_charset_info);
table->field[IS_FILES_ENGINE]->set_notnull();
table->field[IS_FILES_ENGINE]->store(ndbcluster_hton_name,
=== modified file 'storage/ndb/src/common/util/ndbzio.c'
--- a/storage/ndb/src/common/util/ndbzio.c 2011-07-04 13:37:56 +0000
+++ b/storage/ndb/src/common/util/ndbzio.c 2011-10-20 18:36:21 +0000
@@ -428,7 +428,7 @@ int read_buffer(ndbzio_stream *s)
my_errno= 0;
if (s->stream.avail_in == 0)
{
- s->stream.avail_in = my_read(s->file, (uchar *)s->inbuf, AZ_BUFSIZE_READ, MYF(0));
+ s->stream.avail_in = (uInt)my_read(s->file, (uchar *)s->inbuf, AZ_BUFSIZE_READ, MYF(0));
if(s->stream.avail_in > 0)
my_errno= 0;
if (s->stream.avail_in == 0)
@@ -681,7 +681,7 @@ unsigned int ZEXPORT ndbzread ( ndbzio_s
bytes_read= my_read(s->file, (uchar *)next_out, s->stream.avail_out,
MYF(0));
if(bytes_read>0)
- s->stream.avail_out -= bytes_read;
+ s->stream.avail_out -= (uInt)bytes_read;
if (bytes_read == 0)
{
s->z_eof = 1;
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp 2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Win32AsyncFile.cpp 2011-10-20 18:36:21 +0000
@@ -217,7 +217,7 @@ Win32AsyncFile::readBuffer(Request* req,
DWORD dwBytesRead;
BOOL bRead = ReadFile(hFile,
buf,
- size,
+ (DWORD)size,
&dwBytesRead,
&ov);
if(!bRead){
@@ -248,7 +248,7 @@ Win32AsyncFile::readBuffer(Request* req,
buf += bytes_read;
size -= bytes_read;
- offset += bytes_read;
+ offset += (off_t)bytes_read;
}
return 0;
}
@@ -277,7 +277,7 @@ Win32AsyncFile::writeBuffer(const char *
size_t bytes_written = 0;
DWORD dwWritten;
- BOOL bWrite = WriteFile(hFile, buf, bytes_to_write, &dwWritten, &ov);
+ BOOL bWrite = WriteFile(hFile, buf, (DWORD)bytes_to_write, &dwWritten, &ov);
if(!bWrite) {
return GetLastError();
}
@@ -288,7 +288,7 @@ Win32AsyncFile::writeBuffer(const char *
buf += bytes_written;
size -= bytes_written;
- offset += bytes_written;
+ offset += (off_t)bytes_written;
}
return 0;
}
@@ -393,7 +393,7 @@ loop:
do {
if (0 != strcmp(".", ffd.cFileName) && 0 != strcmp("..", ffd.cFileName))
{
- int len = strlen(path);
+ int len = (int)strlen(path);
strcat(path, ffd.cFileName);
if(DeleteFile(path) || RemoveDirectory(path))
{
=== modified file 'storage/ndb/tools/ndb_dump_frm_data.cpp'
--- a/storage/ndb/tools/ndb_dump_frm_data.cpp 2011-07-04 13:37:56 +0000
+++ b/storage/ndb/tools/ndb_dump_frm_data.cpp 2011-10-20 18:36:21 +0000
@@ -104,7 +104,7 @@ dofile(const char* file)
break;
}
ssize_t size2;
- if ((size2 = read(fd, data, size)) == -1)
+ if ((size2 = read(fd, data, (unsigned)size)) == -1)
{
fprintf(stderr, "%s: read: %s\n", file, strerror(errno));
break;
@@ -137,7 +137,7 @@ dofile(const char* file)
printf(" orig: %u\n", (uint)size);
printf(" pack: %u\n", (uint)pack_len);
printf("*/\n\n");
- dodump(name, pack_data, pack_len);
+ dodump(name, pack_data, (uint)pack_len);
ret = 0;
}
while (0);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4614 to 4615) | jonas oreland | 20 Oct |