MariaDB made be compiled by gcc 4.8.1
There was 2 problems: 1) coping/moving of the same type (usually casting) as sizeof() (solved in different ways depends on the cause); 2) using 'const' in SSL_CTX::getVerifyCallback() which return object (not reference) and so copy of the object will be created and 'const' has no sens.
This commit is contained in:
parent
883af99e7d
commit
5ce11d8b4c
@ -440,7 +440,7 @@ public:
|
|||||||
const Ciphers& GetCiphers() const;
|
const Ciphers& GetCiphers() const;
|
||||||
const DH_Parms& GetDH_Parms() const;
|
const DH_Parms& GetDH_Parms() const;
|
||||||
const Stats& GetStats() const;
|
const Stats& GetStats() const;
|
||||||
const VerifyCallback getVerifyCallback() const;
|
VerifyCallback getVerifyCallback() const;
|
||||||
pem_password_cb GetPasswordCb() const;
|
pem_password_cb GetPasswordCb() const;
|
||||||
void* GetUserData() const;
|
void* GetUserData() const;
|
||||||
bool GetSessionCacheOff() const;
|
bool GetSessionCacheOff() const;
|
||||||
|
@ -1852,7 +1852,7 @@ SSL_CTX::GetCA_List() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const VerifyCallback SSL_CTX::getVerifyCallback() const
|
VerifyCallback SSL_CTX::getVerifyCallback() const
|
||||||
{
|
{
|
||||||
return verifyCallback_;
|
return verifyCallback_;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ my_MD5Final (unsigned char digest[16], my_MD5Context *ctx)
|
|||||||
putu32(ctx->buf[1], digest + 4);
|
putu32(ctx->buf[1], digest + 4);
|
||||||
putu32(ctx->buf[2], digest + 8);
|
putu32(ctx->buf[2], digest + 8);
|
||||||
putu32(ctx->buf[3], digest + 12);
|
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
|
#ifndef ASM_MD5
|
||||||
|
@ -7433,7 +7433,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
|
|||||||
if (!String::needs_conversion(length, cs, field_charset, &dummy_offset))
|
if (!String::needs_conversion(length, cs, field_charset, &dummy_offset))
|
||||||
{
|
{
|
||||||
Field_blob::store_length(length);
|
Field_blob::store_length(length);
|
||||||
bmove(ptr+packlength,(char*) &from,sizeof(char*));
|
bmove(ptr + packlength, &from, sizeof(char*));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (tmpstr.copy(from, length, cs))
|
if (tmpstr.copy(from, length, cs))
|
||||||
@ -8071,7 +8071,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
|
|||||||
value.copy(from, length, cs);
|
value.copy(from, length, cs);
|
||||||
from= value.ptr();
|
from= value.ptr();
|
||||||
}
|
}
|
||||||
bmove(ptr + packlength, (char*) &from, sizeof(char*));
|
bmove(ptr + packlength, &from, sizeof(char*));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -7171,7 +7171,7 @@ my_bool _ma_apply_undo_row_delete(MARIA_HA *info, LSN undo_lsn,
|
|||||||
|
|
||||||
memcpy(field_pos, field_length_data, size_length);
|
memcpy(field_pos, field_length_data, size_length);
|
||||||
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;
|
header+= blob_length;
|
||||||
*blob_lengths++= blob_length;
|
*blob_lengths++= blob_length;
|
||||||
break;
|
break;
|
||||||
|
@ -58,7 +58,7 @@ ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
|
|||||||
length= _ma_calc_blob_length(blob_size_length, pos);
|
length= _ma_calc_blob_length(blob_size_length, pos);
|
||||||
if (length)
|
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);
|
crc= my_checksum(crc, pos, length);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
@ -589,7 +589,7 @@ static int _ma_put_key_in_record(register MARIA_HA *info, uint keynr,
|
|||||||
if (unpack_blobs)
|
if (unpack_blobs)
|
||||||
{
|
{
|
||||||
memcpy(record+keyseg->start+keyseg->bit_start,
|
memcpy(record+keyseg->start+keyseg->bit_start,
|
||||||
(char*) &blob_ptr,sizeof(char*));
|
&blob_ptr, sizeof(char*));
|
||||||
memcpy(blob_ptr,key,length);
|
memcpy(blob_ptr,key,length);
|
||||||
blob_ptr+=length;
|
blob_ptr+=length;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
|
|||||||
length=_mi_calc_blob_length(column->length-
|
length=_mi_calc_blob_length(column->length-
|
||||||
portable_sizeof_char_ptr,
|
portable_sizeof_char_ptr,
|
||||||
buf);
|
buf);
|
||||||
memcpy((char*) &pos, buf+column->length- portable_sizeof_char_ptr,
|
memcpy(&pos, buf+column->length- portable_sizeof_char_ptr,
|
||||||
sizeof(char*));
|
sizeof(char*));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +425,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
|
|||||||
if (unpack_blobs)
|
if (unpack_blobs)
|
||||||
{
|
{
|
||||||
memcpy(record+keyseg->start+keyseg->bit_start,
|
memcpy(record+keyseg->start+keyseg->bit_start,
|
||||||
(char*) &blob_ptr,sizeof(char*));
|
&blob_ptr, sizeof(char *));
|
||||||
memcpy(blob_ptr,key,length);
|
memcpy(blob_ptr,key,length);
|
||||||
blob_ptr+=length;
|
blob_ptr+=length;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user