Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a040586c
Commit
a040586c
authored
Jun 14, 2013
by
Tor Didriksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#16729109: FIX COMPILATION WARNINGS WITH GCC 4.8
Backport to 5.5 (external Bug#69407 Build warnings with mysql)
parent
9f7043ab
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
16 deletions
+20
-16
include/my_global.h
include/my_global.h
+2
-2
mysys/CMakeLists.txt
mysys/CMakeLists.txt
+6
-1
sql/debug_sync.cc
sql/debug_sync.cc
+2
-2
sql/field.cc
sql/field.cc
+3
-3
storage/myisam/mi_checksum.c
storage/myisam/mi_checksum.c
+1
-2
storage/myisam/mi_key.c
storage/myisam/mi_key.c
+2
-2
storage/myisam/mi_packrec.c
storage/myisam/mi_packrec.c
+2
-2
support-files/build-tags
support-files/build-tags
+1
-1
unittest/mysys/explain_filename-t.cc
unittest/mysys/explain_filename-t.cc
+1
-1
No files found.
include/my_global.h
View file @
a040586c
/*
/*
Copyright (c) 2001, 201
2
, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2001, 201
3
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -391,7 +391,7 @@ C_MODE_END
...
@@ -391,7 +391,7 @@ C_MODE_END
#define compile_time_assert(X) \
#define compile_time_assert(X) \
do \
do \
{ \
{ \
typedef char compile_time_assert[(X) ? 1 : -1]
;
\
typedef char compile_time_assert[(X) ? 1 : -1]
__attribute__((unused));
\
} while(0)
} while(0)
#endif
#endif
...
...
mysys/CMakeLists.txt
View file @
a040586c
# Copyright (c) 2006, 201
1
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 201
3
, Oracle and/or its affiliates. All rights reserved.
#
#
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
...
@@ -69,6 +69,11 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
...
@@ -69,6 +69,11 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${
LIBNSL
}
${
LIBM
}
${
LIBRT
}
)
${
LIBNSL
}
${
LIBM
}
${
LIBRT
}
)
DTRACE_INSTRUMENT
(
mysys
)
DTRACE_INSTRUMENT
(
mysys
)
# Need explicit pthread for gcc -fsanitize=address
IF
(
CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES
"-fsanitize="
)
TARGET_LINK_LIBRARIES
(
mysys pthread
)
ENDIF
()
ADD_EXECUTABLE
(
thr_lock thr_lock.c
)
ADD_EXECUTABLE
(
thr_lock thr_lock.c
)
TARGET_LINK_LIBRARIES
(
thr_lock mysys
)
TARGET_LINK_LIBRARIES
(
thr_lock mysys
)
SET_TARGET_PROPERTIES
(
thr_lock PROPERTIES COMPILE_FLAGS
"-DMAIN"
)
SET_TARGET_PROPERTIES
(
thr_lock PROPERTIES COMPILE_FLAGS
"-DMAIN"
)
sql/debug_sync.cc
View file @
a040586c
/* Copyright (c) 2009, 201
1
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2009, 201
3
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -1737,7 +1737,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
...
@@ -1737,7 +1737,7 @@ static void debug_sync_execute(THD *thd, st_debug_sync_action *action)
if
(
action
->
wait_for
.
length
())
if
(
action
->
wait_for
.
length
())
{
{
mysql_mutex_t
*
old_mutex
;
mysql_mutex_t
*
old_mutex
;
mysql_cond_t
*
old_cond
;
mysql_cond_t
*
old_cond
=
NULL
;
int
error
=
0
;
int
error
=
0
;
struct
timespec
abstime
;
struct
timespec
abstime
;
...
...
sql/field.cc
View file @
a040586c
/*
/*
Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -7380,7 +7380,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs)
...
@@ -7380,7 +7380,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
))
...
@@ -7897,7 +7897,7 @@ int Field_geom::store(const char *from, uint length, CHARSET_INFO *cs)
...
@@ -7897,7 +7897,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
;
...
...
storage/myisam/mi_checksum.c
View file @
a040586c
...
@@ -33,8 +33,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
...
@@ -33,8 +33,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
length
=
_mi_calc_blob_length
(
rec
->
length
-
length
=
_mi_calc_blob_length
(
rec
->
length
-
portable_sizeof_char_ptr
,
portable_sizeof_char_ptr
,
buf
);
buf
);
memcpy
((
char
*
)
&
pos
,
buf
+
rec
->
length
-
portable_sizeof_char_ptr
,
memcpy
(
&
pos
,
buf
+
rec
->
length
-
portable_sizeof_char_ptr
,
sizeof
(
char
*
));
sizeof
(
char
*
));
break
;
break
;
}
}
case
FIELD_VARCHAR
:
case
FIELD_VARCHAR
:
...
...
storage/myisam/mi_key.c
View file @
a040586c
/* Copyright (c) 2000, 201
0
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -418,7 +418,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
...
@@ -418,7 +418,7 @@ static int _mi_put_key_in_record(register MI_INFO *info, uint keynr,
goto
err
;
goto
err
;
#endif
#endif
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
;
...
...
storage/myisam/mi_packrec.c
View file @
a040586c
/* Copyright (c) 2000, 201
1
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -1051,7 +1051,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
...
@@ -1051,7 +1051,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
}
}
decode_bytes
(
rec
,
bit_buff
,
bit_buff
->
blob_pos
,
bit_buff
->
blob_pos
+
length
);
decode_bytes
(
rec
,
bit_buff
,
bit_buff
->
blob_pos
,
bit_buff
->
blob_pos
+
length
);
_my_store_blob_length
((
uchar
*
)
to
,
pack_length
,
length
);
_my_store_blob_length
((
uchar
*
)
to
,
pack_length
,
length
);
memcpy
(
(
char
*
)
to
+
pack_length
,
&
bit_buff
->
blob_pos
,
sizeof
(
char
*
));
memcpy
(
to
+
pack_length
,
&
bit_buff
->
blob_pos
,
sizeof
(
char
*
));
bit_buff
->
blob_pos
+=
length
;
bit_buff
->
blob_pos
+=
length
;
}
}
}
}
...
...
support-files/build-tags
View file @
a040586c
#! /bin/sh
#! /bin/sh
rm
-f
TAGS
rm
-f
TAGS
filter
=
'\.cc$\|\.c$\|\.h$\|\.yy$'
filter
=
'\.cc$\|\.c$\|\.h$\|
sql_yacc
\.yy$'
list
=
"find . -type f"
list
=
"find . -type f"
bzr root
>
/dev/null 2>/dev/null
&&
list
=
"bzr ls --from-root -R --kind=file --versioned"
bzr root
>
/dev/null 2>/dev/null
&&
list
=
"bzr ls --from-root -R --kind=file --versioned"
...
...
unittest/mysys/explain_filename-t.cc
View file @
a040586c
...
@@ -64,7 +64,7 @@ void test_1(const char *in, const char *exp, enum_explain_filename_mode mode)
...
@@ -64,7 +64,7 @@ void test_1(const char *in, const char *exp, enum_explain_filename_mode mode)
int
main
()
int
main
()
{
{
setup
();
setup
();
plan
(
NO_PLAN
);
plan
(
22
);
test_1
(
"test/t1.ibd"
,
test_1
(
"test/t1.ibd"
,
"Database
\"
test
\"
, Table
\"
t1.ibd
\"
"
,
"Database
\"
test
\"
, Table
\"
t1.ibd
\"
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment