[Commits] Rev 3528: Fix compile warnings in file:///data0/psergey/dev2/5.5-cassandra-r01-build/

Sergey Petrunya psergey at askmonty.org
Fri Sep 28 13:01:52 EEST 2012


At file:///data0/psergey/dev2/5.5-cassandra-r01-build/

------------------------------------------------------------
revno: 3528
revision-id: psergey at askmonty.org-20120928100152-wdq9b1vit6tf5g8o
parent: sanja at montyprogram.com-20120928123049-4ai9g507n0qwtz6t
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.5-cassandra-r01-build
timestamp: Fri 2012-09-28 14:01:52 +0400
message:
  Fix compile warnings
=== modified file 'storage/cassandra/ha_cassandra.cc'
--- a/storage/cassandra/ha_cassandra.cc	2012-09-28 12:30:49 +0000
+++ b/storage/cassandra/ha_cassandra.cc	2012-09-28 10:01:52 +0000
@@ -160,8 +160,8 @@
 
   if (new_host)
   {
-    strncpy(cassandra_default_host_buf, new_host, max_len);
-    cassandra_default_host_buf[max_len]= 0;
+    strncpy(cassandra_default_host_buf, new_host, max_len-1);
+    cassandra_default_host_buf[max_len-1]= 0;
     cassandra_default_thrift_host= cassandra_default_host_buf;
   }
   else
@@ -539,10 +539,8 @@
 int ha_cassandra::create(const char *name, TABLE *table_arg,
                          HA_CREATE_INFO *create_info)
 {
-  ha_table_option_struct *options= table_arg->s->option_struct;
   int res;
   DBUG_ENTER("ha_cassandra::create");
-  DBUG_ASSERT(options);
 
   Field **pfield= table_arg->s->field;
   if (!((*pfield)->flags & NOT_NULL_FLAG))



More information about the commits mailing list