#At file:///home/stewart/mysql/win-ndbwin32/
2863 Stewart Smith 2008-10-01
fix tsman compiler warning (unary minus applied to unsigned: result still unsigned)
<stewart> jonas: in tsman.hpp, Tablespace_client::alloc_extent(Local_key*), the error path: "return -req->reply.errorCode;" generates a warning: "unary minus operator applied to unsigned type, result still unsigned". I gather what it should be is a cast to int and then apply - ?
<stewart> jonas: (also in free_extent() and alloc_page_from_extent() )
<jonas> stewart: yes, something like that
<jonas> windows compiler ?
<stewart> jonas: yes
jonas: any opportunity for this to cause real bug?
<jonas> na
modified:
storage/ndb/src/kernel/blocks/tsman.hpp
=== modified file 'storage/ndb/src/kernel/blocks/tsman.hpp'
--- a/storage/ndb/src/kernel/blocks/tsman.hpp 2008-09-30 15:10:29 +0000
+++ b/storage/ndb/src/kernel/blocks/tsman.hpp 2008-10-01 07:49:14 +0000
@@ -373,7 +373,7 @@ Tablespace_client::alloc_extent(Local_ke
* key = req->reply.page_id;
return req->reply.page_count;
} else {
- return -req->reply.errorCode;
+ return -(int)req->reply.errorCode;
}
}
@@ -393,7 +393,7 @@ Tablespace_client::alloc_page_from_exten
*key = req->key;
return req->bits;
} else {
- return -req->reply.errorCode;
+ return -(int)req->reply.errorCode;
}
}
@@ -412,7 +412,7 @@ Tablespace_client::free_extent(Local_key
if(req->reply.errorCode == 0){
return 0;
} else {
- return -req->reply.errorCode;
+ return -(int)req->reply.errorCode;
}
}
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (stewart:2863) | Stewart Smith | 1 Oct |