[Commits] Rev 3211: make 5.1 compiling with modern gcc. in file:///home/bell/maria/bzr/work-maria-5.1-fakeselect/

sanja at askmonty.org sanja at askmonty.org
Fri Dec 20 12:37:45 EET 2013


At file:///home/bell/maria/bzr/work-maria-5.1-fakeselect/

------------------------------------------------------------
revno: 3211
revision-id: sanja at askmonty.org-20131220103547-j70hkkrb7fnj82wg
parent: sergii at pisem.net-20131129192105-0excqx2i9sj6wt8l
committer: sanja at askmonty.org
branch nick: work-maria-5.1-fakeselect
timestamp: Fri 2013-12-20 12:35:47 +0200
message:
  make 5.1 compiling with modern gcc.
-------------- next part --------------
=== modified file 'mysys/md5.c'
--- a/mysys/md5.c	2009-03-09 18:57:03 +0000
+++ b/mysys/md5.c	2013-12-20 10:35:47 +0000
@@ -176,7 +176,7 @@ my_MD5Final (unsigned char digest[16], m
   putu32(ctx->buf[1], digest + 4);
   putu32(ctx->buf[2], digest + 8);
   putu32(ctx->buf[3], digest + 12);
-  memset(ctx, 0, sizeof(ctx));	/* In case it's sensitive */
+  memset(ctx, 0, sizeof(*ctx));	/* In case it's sensitive */
 }
 
 #ifndef ASM_MD5

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2013-02-28 08:58:39 +0000
+++ b/sql/field.cc	2013-12-20 10:35:47 +0000
@@ -7709,7 +7709,7 @@ int Field_blob::store(const char *from,u
     if (!String::needs_conversion(length, cs, field_charset, &dummy_offset))
     {
       Field_blob::store_length(length);
-      bmove(ptr+packlength,(char*) &from,sizeof(char*));
+      bmove(ptr + packlength, &from, sizeof(char*));
       return 0;
     }
     if (tmpstr.copy(from, length, cs))
@@ -8364,7 +8364,7 @@ int Field_geom::store(const char *from,
       value.copy(from, length, cs);
       from= value.ptr();
     }
-    bmove(ptr + packlength, (char*) &from, sizeof(char*));
+    bmove(ptr + packlength, &from, sizeof(char*));
   }
   return 0;
 

=== modified file 'storage/maria/ma_blockrec.c'
--- a/storage/maria/ma_blockrec.c	2013-05-11 12:55:11 +0000
+++ b/storage/maria/ma_blockrec.c	2013-12-20 10:35:47 +0000
@@ -7154,7 +7154,7 @@ my_bool _ma_apply_undo_row_delete(MARIA_
 
       memcpy(field_pos, field_length_data, size_length);
       field_length_data+= size_length;
-      memcpy(field_pos + size_length, &header, sizeof(&header));
+      memcpy(field_pos + size_length, &header, sizeof(header));
       header+= blob_length;
       *blob_lengths++= blob_length;
       break;

=== modified file 'storage/maria/ma_checksum.c'
--- a/storage/maria/ma_checksum.c	2008-04-03 13:40:25 +0000
+++ b/storage/maria/ma_checksum.c	2013-12-20 10:35:47 +0000
@@ -58,7 +58,7 @@ ha_checksum _ma_checksum(MARIA_HA *info,
       length= _ma_calc_blob_length(blob_size_length, pos);
       if (length)
       {
-        memcpy((char*) &pos, pos + blob_size_length, sizeof(char*));
+        memcpy(&pos, pos + blob_size_length, sizeof(char*));
         crc= my_checksum(crc, pos, length);
       }
       continue;

=== modified file 'storage/maria/ma_key.c'
--- a/storage/maria/ma_key.c	2011-01-24 13:19:40 +0000
+++ b/storage/maria/ma_key.c	2013-12-20 10:35:47 +0000
@@ -583,7 +583,7 @@ static int _ma_put_key_in_record(registe
 	goto err;
 #endif
       memcpy(record+keyseg->start+keyseg->bit_start,
-	     (char*) &blob_ptr,sizeof(char*));
+	     &blob_ptr,sizeof(char*));
       memcpy(blob_ptr,key,length);
       blob_ptr+=length;
 

=== modified file 'storage/myisam/mi_checksum.c'
--- a/storage/myisam/mi_checksum.c	2008-04-28 16:24:05 +0000
+++ b/storage/myisam/mi_checksum.c	2013-12-20 10:35:47 +0000
@@ -40,7 +40,7 @@ ha_checksum mi_checksum(MI_INFO *info, c
       length=_mi_calc_blob_length(column->length-
                                   portable_sizeof_char_ptr,
                                   buf);
-      memcpy((char*) &pos, buf+column->length- portable_sizeof_char_ptr,
+      memcpy(&pos, buf+column->length- portable_sizeof_char_ptr,
 	     sizeof(char*));
       break;
     }

=== modified file 'storage/myisam/mi_key.c'
--- a/storage/myisam/mi_key.c	2008-04-28 16:24:05 +0000
+++ b/storage/myisam/mi_key.c	2013-12-20 10:35:47 +0000
@@ -419,7 +419,7 @@ static int _mi_put_key_in_record(registe
 	goto err;
 #endif
       memcpy(record+keyseg->start+keyseg->bit_start,
-	     (char*) &blob_ptr,sizeof(char*));
+	     &blob_ptr,sizeof(char*));
       memcpy(blob_ptr,key,length);
       blob_ptr+=length;
 

=== modified file 'storage/pbxt/src/myxt_xt.cc'
--- a/storage/pbxt/src/myxt_xt.cc	2011-10-27 12:22:52 +0000
+++ b/storage/pbxt/src/myxt_xt.cc	2013-12-20 10:35:47 +0000
@@ -937,7 +937,7 @@ xtPublic xtBool myxt_create_row_from_key
 			 */
 			byte *key_ptr = key; // Cannot take the address of a register variable!
 			memcpy(record+keyseg->start+keyseg->bit_start,
-			 (char*) &key_ptr,sizeof(char*));
+                               &key_ptr,sizeof(char*));
 
 			my_store_blob_length(record+keyseg->start,
 					(uint) keyseg->bit_start,length);



More information about the commits mailing list